NotAValue implements Value { @Override public Slice slice() { throw unsupported(); } private  NotAValue(); @Override Slice slice(); @Override Encoding encoding(); @Override byte[] value(); @Override BigInteger length(); @Override BigInteger asNumeric(); @Override String asString(); @Override BitSet asBitSet(); @Override String toString(); @Override boolean equals(final Object obj); @Override int hashCode(); static final Value NOT_A_VALUE; }
@Test public void getSlice() { thrown.expect(UnsupportedOperationException.class); thrown.expectMessage("NOT_A_VALUE does not support any Value operation."); NOT_A_VALUE.slice(); }