}
@Test
public void testAegisClient() throws Exception {
AegisDatabinding aegisBinding = new AegisDatabinding();
ClientProxyFactoryBean proxyFactory = new ClientProxyFactoryBean();
proxyFactory.setDataBinding(aegisBinding);
proxyFactory.setServiceClass(AuthService.class);
proxyFactory.setAddress("http://localhost:9002/service");
AuthService service = (AuthService) proxyFactory.create();
assertTrue(service.authenticate("Joe", "Joe", "123"));
assertFalse(service.authenticate("Joe1", "Joe", "fang"));
assertTrue(service.authenticate("Joe", null, "123"));
List<String> list = service.getRoles("Joe");
assertEquals(3, list.size());