GraphResourceRepository extends GraphGenericRepository<ResourceEntity> implements ResourceRepository, ResourceHierarchicalRepository { @Override public <S extends ResourceEntity> List<S> findAll(final Example<S> example) { throw new UnsupportedOperationException(MESSAGE); }  @Override ResourceEntity getByZoneAndResourceIdentifier(final ZoneEntity zone, final String resourceIdentifier); @Override ResourceEntity getResourceWithInheritedAttributes(final ZoneEntity zone, final String resourceIdentifier); @Override Set<String> getResourceEntityAndDescendantsIds(final ResourceEntity entity); @Override List<S> findAll(final Example<S> example); @Override List<S> findAll(final Example<S> example, final Sort sort); @Override S findOne(final Example<S> example); @Override Page<S> findAll(final Example<S> example, final Pageable pageable); @Override long count(final Example<S> example); @Override boolean exists(final Example<S> example); static final String RESOURCE_LABEL; static final String RESOURCE_ID_KEY; }
@Test public void testFindAll() { dropAllResources(); assertThat(this.graphTraversalSource.V().count().next().intValue(), equalTo(0)); ResourceEntity resourceEntity1 = persistRandomResourcetoZone1AndAssert(); assertThat(this.graphTraversalSource.V().count().next().intValue(), equalTo(1)); ResourceEntity resourceEntity2 = persistResource2toZone1AndAssert(); assertThat(this.graphTraversalSource.V().count().next().intValue(), equalTo(2)); List<ResourceEntity> resources = this.resourceRepository.findAll(); assertThat(resources.size(), equalTo(2)); assertThat(resources, hasItems(resourceEntity1, resourceEntity2)); dropAllResources(); }