MyApplication { public boolean sendMessage(String msg, String rec){ return service.sendMessage(msg, rec); }  @Inject void setService(MessageService svc); boolean sendMessage(String msg, String rec);  }
@Test public void test() { MyApplication appTest = injector.getInstance(MyApplication.class); Assert.assertEquals(true, appTest.sendMessage("Hi Pankaj", "pankaj@abc.com"));; }