### Question:
DomainServiceImpl implements DomainService, Constants { @Override public List<Domain> getAllDomains() { return domainRepository.findAll(); }  @Override Collection<String> getAllDomainNames(); @Override List<Domain> getAllDomains(); @Override Domain getDomainByName(final String domainName); @Override Page<Object[]> getAllDomainDetails(final String searchTerm, final int page, final int size); @Override String createDomain(final CreateUpdateDomain createUpdateDomain, final String userId); @Override String updateDomain(final CreateUpdateDomain createUpdateDomain, final String userId);  }### Answer:
@Test public void getAllDomainsTest() { List<Domain> allDomains = getAllDomainRespone(); when(domainRepository.findAll()).thenReturn(allDomains); assertThat(domainService.getAllDomains().size(), is(1)); }