@Test public void testListFilterOptions() { ProjectInfo matchingProject = ProjectInfo.newBuilder("matching-project") .setName("MyProject") .setLabels(ImmutableMap.of("color", "blue", "size", "big")) .build(); ProjectInfo nonMatchingProject1 = ProjectInfo.newBuilder("non-matching-project1") .setName("myProject") .setLabels(ImmutableMap.of("color", "blue")) .build(); ProjectInfo nonMatchingProject2 = ProjectInfo.newBuilder("non-matching-project2") .setName("myProj") .setLabels(ImmutableMap.of("color", "blue", "size", "big")) .build(); ProjectInfo nonMatchingProject3 = ProjectInfo.newBuilder("non-matching-project3").build(); RESOURCE_MANAGER.create(matchingProject); RESOURCE_MANAGER.create(nonMatchingProject1); RESOURCE_MANAGER.create(nonMatchingProject2); RESOURCE_MANAGER.create(nonMatchingProject3); for (Project p : RESOURCE_MANAGER.list(LIST_FILTER).getValues()) { assertFalse(p.equals(nonMatchingProject1)); assertFalse(p.equals(nonMatchingProject2)); compareReadWriteFields(matchingProject, p); assertSame(RESOURCE_MANAGER, p.getResourceManager()); } }