@Test
public void testRegister() throws Exception {

    new Expectations() {
        {
            mockCtx.getConfig();
            times = 3;
            result = mockNotifierConfig;
            mockNotifierConfig.getClassName();
            times = 1;
            result = "Test";
            mockNotifierConfig.getJarPath();
            times = 1;
            result = "/tmp/test.jar";
            mockProxyUtil.loadClassFromJar("/tmp/test.jar", "Test");
            result = mockNotifier;
        }
    };
    Notifier result = notificationService.register("test_notifier", mockCtx);
    assertEquals(mockNotifier, result);
    new Verifications() {
        {
            NotificationContext ctx;
            mockNotifier.open(ctx = withCapture());
            times = 1;
            assertEquals(NotificationServiceContext.class, ctx.getClass());
        }
    };
}