public List<ServiceReference> answer(InvocationOnMock invocationOnMock) throws Throwable {
return serviceReferences;
}
});
WiringService wiringServiceMock = mock(WiringService.class);
when(osgiServiceMock.getService(WiringService.class)).thenReturn(wiringServiceMock);
when(wiringServiceMock.getDomainEndpoints(NullDomain.class, "*")).thenAnswer(new Answer<List<? extends
Domain>>() {
@Override
public List<? extends Domain> answer(InvocationOnMock invocationOnMock) throws Throwable {
return domainEndpoints;
}