AccumuloEntityValueLoader extends AccumuloElementValueLoader { @SuppressFBWarnings(value = "BC_UNCONFIRMED_CAST", justification = "element provided should always be an Entity") @Override public void loadIdentifiers(final Element entity) { ((Entity) entity).setVertex(((EntityId) elementConverter.getElementId(key, false)).getVertex()); } AccumuloEntityValueLoader(final String group,
                                     final Key key,
                                     final Value value,
                                     final AccumuloElementConverter elementConverter,
                                     final Schema schema); @SuppressFBWarnings(value = "BC_UNCONFIRMED_CAST", justification = "element provided should always be an Entity") @Override void loadIdentifiers(final Element entity);  }
@Test public void shouldLoadAllIdentifiers() throws SerialisationException { final String group = TestGroups.ENTITY; final Key key = mock(Key.class); final Value value = mock(Value.class); final AccumuloElementConverter converter = mock(AccumuloElementConverter.class); final Schema schema = createSchema(); final AccumuloEntityValueLoader loader = new AccumuloEntityValueLoader(group, key, value, converter, schema); final Entity entity = mock(Entity.class); final EntityId elementId = new EntitySeed("vertex"); given(converter.getElementId(key, false)).willReturn(elementId); loader.loadIdentifiers(entity); verify(converter, never()).getPropertiesFromColumnQualifier(Mockito.eq(group), Mockito.any(byte[].class)); verify(converter, never()).getPropertiesFromColumnVisibility(Mockito.eq(group), Mockito.any(byte[].class)); verify(converter, never()).getPropertiesFromTimestamp(Mockito.eq(group), Mockito.anyLong()); verify(converter, never()).getPropertiesFromValue(Mockito.eq(group), Mockito.any(Value.class)); }