CompetitionGroupMapper { public abstract CompetitionGroupApiEntity toApiEntity(CompetitionGroup domainEntity);  abstract CompetitionGroupAddPayload toDomainAddPayload(AddCompetitionGroupRequest apiAddRequest); abstract CompetitionGroupApiEntity toApiEntity(CompetitionGroup domainEntity); abstract List<CompetitionGroupApiEntity> toApiEntityList(List<CompetitionGroup> domainEntityList); abstract CompetitionGroupHibernateEntity toHibernateEntity(CompetitionGroupAddPayload domainAddPayload); CompetitionGroupHibernateEntity toHibernateEntity(CompetitionGroup domainEntity); abstract void updateHibernateEntity(
            CompetitionGroup domainEntity,
            @MappingTarget CompetitionGroupHibernateEntity hibernateEntity
    ); abstract CompetitionGroup toDomainEntity(CompetitionGroupHibernateEntity hibernateEntity); abstract List<CompetitionGroup> toDomainEntityList(
            List<CompetitionGroupHibernateEntity> hibernateEntityList
    ); void setDao(CompetitionGroupDao dao);  }
@Test public void whenToApiEntityFromDomainEntity() { CompetitionGroup domainEntity = DomainEntityTestUtils.fullCompetitionGroup(); CompetitionGroupApiEntity expected = ApiEntityTestUtils.fullCompetitionGroup(); CompetitionGroupApiEntity actual = mapper.toApiEntity(domainEntity); assertThat(actual).isEqualTo(expected); }