BIndex implements Initialisable { public void remove(final String n3) throws DataAccessLayerException { _byId.removeQuick(_byValue.get(n3)); _byValue.removeQuick(n3); } BIndex(final String indexName); @Override void initialise(final DataAccessLayerFactory factory); byte[] get(final String value); String getQuick(final byte[] id); void putQuick(final String value, final byte[] id); boolean contains(final byte[] id); void remove(final String n3);  }
@Test public void remove() throws Exception { final byte[] id = { 1, 2, 3, 4 }; final String value = randomString(); when(_byValue.get(value)).thenReturn(id); _cut.remove(value); verify(_byValue).get(value); verify(_byId).removeQuick(id); verify(_byValue).removeQuick(value); }