@Test void testMapEntityFilter() throws URISyntaxException { EntityType entityType = when(mock(EntityType.class).getId()).thenReturn("EntityType").getMock(); Attribute attribute0 = when(mock(Attribute.class).getName()).thenReturn("attr0").getMock(); doReturn(STRING).when(attribute0).getDataType(); Attribute attribute1 = when(mock(Attribute.class).getName()).thenReturn("attr1").getMock(); doReturn(STRING).when(attribute1).getDataType(); doReturn(asList(attribute0, attribute1)).when(entityType).getAtomicAttributes(); Entity entity = mock(Entity.class); doReturn("id0").when(entity).getIdValue(); doReturn(entityType).when(entity).getEntityType(); doReturn("string0").when(entity).getString("attr0"); doReturn("string1").when(entity).getString(("attr1")); URI self = new URI("http: EntityResponse expectedEntityResponse = EntityResponse.builder() .setLinks(LinksResponse.create(null, self, null)) .setData(singletonMap("attr1", "string1")) .build(); assertEquals( expectedEntityResponse, entityMapper.map(entity, new Selection(singletonMap("attr1", null)), EMPTY_SELECTION)); }
@Override public EntityResponse map(Entity entity, Selection filter, Selection expand) { return mapRecursive(entity, filter, expand, 0); }
EntityMapperImpl implements EntityMapper { @Override public EntityResponse map(Entity entity, Selection filter, Selection expand) { return mapRecursive(entity, filter, expand, 0); } }
EntityMapperImpl implements EntityMapper { @Override public EntityResponse map(Entity entity, Selection filter, Selection expand) { return mapRecursive(entity, filter, expand, 0); }  }
EntityMapperImpl implements EntityMapper { @Override public EntityResponse map(Entity entity, Selection filter, Selection expand) { return mapRecursive(entity, filter, expand, 0); }  @Override EntityResponse map(Entity entity, Selection filter, Selection expand); @Override EntitiesResponse map(
      EntityCollection entityCollection,
      Selection filter,
      Selection expand,
      int size,
      int number,
      int total); }
EntityMapperImpl implements EntityMapper { @Override public EntityResponse map(Entity entity, Selection filter, Selection expand) { return mapRecursive(entity, filter, expand, 0); }  @Override EntityResponse map(Entity entity, Selection filter, Selection expand); @Override EntitiesResponse map(
      EntityCollection entityCollection,
      Selection filter,
      Selection expand,
      int size,
      int number,
      int total);  }