public abstract class ServiceRegistrationTestBase extends SystemTestBase {
private static final AtomicInteger registryIdCounter = new AtomicInteger();
protected ServiceRegistrar mockServiceRegistrar() {
final ServiceRegistrar registrar = mock(ServiceRegistrar.class);
when(registrar.register(any(ServiceRegistration.class))).thenAnswer(new Answer<Object>() {
@Override
public Object answer(final InvocationOnMock invocationOnMock) throws Throwable {
return mock(ServiceRegistrationHandle.class);
}
});