@Test
 public void testUpdateResourceServer() throws Exception {
   try {
     resource.add(ResourceServerDataGenerator.generateResourceServerDTO(NAME));
     Set<String> groupFilter = new HashSet<String>(Arrays.asList("a", "b"));
     ResourceServerDTO rsToUpdate =
         ResourceServerDTO.builder().withName(NAME).withGroupFilter(groupFilter).build();
     ResourceServerDTO updatedRS = resource.update(NAME, rsToUpdate);
     assertEquals(groupFilter, updatedRS.getGroupFilter());
   } finally {
     resource.delete(NAME);
   }
 }
 private static void assertResourceServer(ResourceServerDTO rs) {
   assertEquals(NAME, rs.getName());
   assertEquals(ResourceServerDataGenerator.GROUP_FILTER, rs.getGroupFilter());
 }