TransientValueDictionary extends ValueDictionaryBase { @Override public void removeValue(final Value value, final boolean p) throws DataAccessLayerException { final byte[] id = getID(value, p); if (id[0] == THRESHOLD_EXCEEDED) { _longLiteralsDictionary.removeValue(value, p); } } TransientValueDictionary(
			final String id, 
			final ITopLevelDictionary longLiteralsDictionary, 
			final int literalLengthThresold);  TransientValueDictionary(final String id); @Override Value getValueInternal(final byte[] id, final boolean p); @Override void removeValue(final Value value, final boolean p); @Override boolean isBNode(final byte[] id); @Override boolean isLiteral(final byte[] id); @Override boolean isResource(final byte[] id);  }
@Test public void removeValueWithoutInvolvingLongLiteralDictionary() throws Exception { final URI uri = VALUE_FACTORY.createURI("http: final ITopLevelDictionary decoratee = mock(ITopLevelDictionary.class); _cut = new TransientValueDictionary(randomString(), decoratee, TransientValueDictionary.DEFAULT_THRESHOLD); _cut.removeValue(uri, false); verify(decoratee, times(0)).removeValue(uri, false); }
@Test public void removeValueInvolvesLongLiteralDictionary() throws Exception { final byte[] persistentId = { TransientValueDictionary.THRESHOLD_EXCEEDED, 2, 3, 4, 5, 6, 7, 78, 8, 9 }; final ITopLevelDictionary decoratee = mock(ITopLevelDictionary.class); when(decoratee.getID(_longLiteral, false)).thenReturn(persistentId); _cut = new TransientValueDictionary(randomString(), decoratee, TransientValueDictionary.DEFAULT_THRESHOLD); _cut.removeValue(_longLiteral, false); verify(decoratee).removeValue(_longLiteral, false); }