public GroupInformation createGroup(DbSession dbSession, String name, @Nullable String description) {
    validateGroupName(name);
    checkNameDoesNotExist(dbSession, name);

    GroupDto group = new GroupDto()
      .setUuid(uuidFactory.create())
      .setName(name)
      .setDescription(description);
    return groupDtoToGroupInformation(dbClient.groupDao().insert(dbSession, group), dbSession);
  }
@Test
  public void createGroup_whenNameAndDescriptionIsProvided_createsGroup() {

    when(uuidFactory.create()).thenReturn("1234");
    GroupDto createdGroup  = mockGroupDto();
    when(dbClient.groupDao().insert(eq(dbSession), any())).thenReturn(createdGroup);
    mockDefaultGroup();
    groupService.createGroup(dbSession, "Name", "Description");

    ArgumentCaptor<GroupDto> groupCaptor = ArgumentCaptor.forClass(GroupDto.class);
    verify(dbClient.groupDao()).insert(eq(dbSession), groupCaptor.capture());
    GroupDto groupToCreate = groupCaptor.getValue();
    assertThat(groupToCreate.getName()).isEqualTo("Name");
    assertThat(groupToCreate.getDescription()).isEqualTo("Description");
    assertThat(groupToCreate.getUuid()).isEqualTo("1234");
  }