assertEquals(((LogonResponse) response.getSuccessResponse()).getSessionId(), "mockSessionId1");
}
@Test
public void addUser() {
CompositeResponse response = ropClient.buildClientRequest()
.addParam("userName", "tomson")
.addParam("password", "123456", true)
.get(LogonResponse.class, "user.getSession", "1.0");
String sessionId = ((LogonResponse) response.getSuccessResponse()).getSessionId();
ropClient.setSessionId(sessionId);
CreateUserRequest createUserRequest = new CreateUserRequest();
createUserRequest.setUserName("katty");
createUserRequest.setSalary(2500L);
Telephone telephone = new Telephone();
telephone.setZoneCode("010");
telephone.setTelephoneCode("12345678");
createUserRequest.setTelephone(telephone);
//add1
response = ropClient.buildClientRequest()
.post(createUserRequest, CreateUserResponse.class, "user.add", "1.0");
assertNotNull(response);
assertTrue(response.isSuccessful());
assertTrue(response.getSuccessResponse() instanceof CreateUserResponse);
//add2
response = ropClient.buildClientRequest()
.post(createUserRequest, CreateUserResponse.class, "user.add", "1.0");
}