remoteConnector.getInvocationHistory().clear();
osgiService.doSomethingWithMessage("test");
assertThat(remoteConnector.getInvocationHistory().isEmpty(), is(false));
remoteConnector.stop();
boolean unregistered = false;
for (int i = 0; i < 5; i++) {
Thread.sleep(1000);