@Test public void list() throws Exception { UserServiceEndpoint endpoint = new UserServiceEndpoint(new WhitelistUserService(context)); Set<String> expected = new TreeSet<>(); expected.add("bar@example.com"); expected.add("foo@example.com"); Assert.assertEquals(expected, endpoint.get()); }
@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);  }