@Test public void testDescriptionStatic() { JMXNotifier notifier = new JMXNotifier(); try { notifier.init(); } catch (Exception e) { fail("Failed to init notifier: " + e); } TestObject to = new TestObject(); to.setName(TEST_OBJECT_DESCRIPTION); String result = notifier.getDescription(to); if (!result.equals(to.toString())) { fail("Incorrect description"); } }
@Test public void testInsertTypeScript() { JMXNotifier notifier = new JMXNotifier(); notifier.setInsertTypeScript("scripts/Type.mvel"); try { notifier.init(); } catch (Exception e) { fail("Failed to init notifier: " + e); } TestObject to = new TestObject(); to.setName(INSERT_TYPE_1); String result = notifier.getInsertType(to); if (!result.equals(INSERT_TYPE_1)) { fail("Incorrect type"); } }