@Test public void getAddrInvalidMapped() throws Exception { UserServiceEndpoint endpoint = new UserServiceEndpoint(new WhitelistUserService(context)); Map<String, Object> expected = new LinkedHashMap<>(); expected.put("isValidEmail", false); expected.put("toValidEmail", "foo@example.com"); Assert.assertEquals(expected, endpoint.get("abc@example.com")); }
@Override public Object get() { return service.emailAddresses(); }
UserServiceEndpoint implements HttpEndpoint { @Override public Object get() { return service.emailAddresses(); } }
UserServiceEndpoint implements HttpEndpoint { @Override public Object get() { return service.emailAddresses(); } @Inject  UserServiceEndpoint(UserService service); }
UserServiceEndpoint implements HttpEndpoint { @Override public Object get() { return service.emailAddresses(); } @Inject  UserServiceEndpoint(UserService service); @Override Object get(); @Override Object get(String path); }
UserServiceEndpoint implements HttpEndpoint { @Override public Object get() { return service.emailAddresses(); } @Inject  UserServiceEndpoint(UserService service); @Override Object get(); @Override Object get(String path);  }