}
@Test
@SuppressWarnings("unchecked")
public void receiveJsonRequest4Record() {
Record record = new Record();
record.put("a", "a");
record.put("b", 1);
JsonRequest<Record> request = new JsonRequest<Record>();
request.setBody(record);
request.setLoginName("user1");
request.setPassword("1234");
request.setVersion("1101");
request.setUserType(JsonRequest.USER_TYPE_EMPLOYEE);
String json = Json.toJson(request);
// System.out.println(json);
request = (JsonRequest<Record>) Json.fromJson(new NutType(request.getClass(),
record.getClass()),
json);
// System.out.println(request.getBody().getString("a"));
// System.out.println(request.getBody().getInt("b"));
}