@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"); } }