private static void assertNullsThrowException(Funnel<?> funnel) { PrimitiveSink primitiveSink = new AbstractStreamingHasher(4, 4) { @Override HashCode makeHash() { throw new UnsupportedOperationException(); } @Override protected void process(ByteBuffer bb) { while (bb.hasRemaining()) { bb.get(); } } }; try { funnel.funnel(null, primitiveSink); fail(); } catch (NullPointerException ok) {} }