assertEquals("UNKNOWN EVENT TYPE", OsgiStringUtils.nullSafeToString(new ServiceEvent(-123,
new MockServiceReference())));
}
public void testNullSafeToStringFrameworkEvent() throws Exception {
Bundle bundle = new MockBundle();
Throwable th = new Exception();
assertEquals("STARTED",
OsgiStringUtils.nullSafeToString(new FrameworkEvent(FrameworkEvent.STARTED, bundle, th)));
assertEquals("ERROR", OsgiStringUtils.nullSafeToString(new FrameworkEvent(FrameworkEvent.ERROR, bundle, th)));