@Test
public void whenFindById() {

    final String testId = "test.id";
    TestHibernateEntity hibernateEntity = mock(TestHibernateEntity.class);
    when(dao.findById(testId)).thenReturn(hibernateEntity);
    TestDomainEntity domainEntity = mock(TestDomainEntity.class);
    when(hibernateEntityToDomainEntityConverter.convert(hibernateEntity)).thenReturn(domainEntity);
    TestDomainEntity actual = gateway.findById(testId);
    verify(dao).findById(testId);
    assertThat(actual).isSameAs(domainEntity);
}