@Test
 public void test_delete_group() {
   Group group = Group.Builder.create().name("group1").build();
   subjectCredentialsService.createGroup(group.getName());
   subjectCredentialsService.delete(group);
   assertThat(subjectCredentialsService.getGroups()).isEmpty();
 }
  @Test
  public void test_create_new_group() {
    Group group = Group.Builder.create().name("group1").build();
    subjectCredentialsService.createGroup(group.getName());

    List<Group> groups = newArrayList(subjectCredentialsService.getGroups());
    assertThat(groups).hasSize(1);
    assertGroupEquals(group, groups.get(0));

    Group found = subjectCredentialsService.getGroup(group.getName());
    assertGroupEquals(group, found);
  }