Notification { public void newMessage(String app, String user, String level, String text) { try { conn = DBusConnection.getConnection(DBusConnection.SYSTEM); MessageConnection c = (MessageConnection) conn.getRemoteObject(ServiceBusName, ObjectPath, MessageConnection.class); c.new_message(app, user, level, text); } catch(DBusException ex) { ex.printStackTrace(); } }  void newMessage(String app, String user, String level, String text);  }
@Test public void testNewMessage() { Notification n = new Notification(); n.newMessage("appJava","","Some thing appened", "NOTICE"); }