public Optional<GroupDto> findGroup(DbSession dbSession, String groupName) {
    return dbClient.groupDao().selectByName(dbSession, groupName);
  }
@Test
  public void findGroup_whenGroupExists_returnsIt() {
    GroupDto groupDto = mockGroupDto();

    when(dbClient.groupDao().selectByName(dbSession, GROUP_NAME))
      .thenReturn(Optional.of(groupDto));

    assertThat(groupService.findGroup(dbSession, GROUP_NAME)).contains(groupDto);
  }