parameters.put("salary", "12.3");
parameters.put("result", "theResult");
MvcResult resultMvc = ControllerUtil.performRouterRequest(mockMvc, null,
parameters, null, null, false);
ExtDirectResponse edsResponse = ControllerUtil.readDirectResponse(resultMvc
.getResponse().getContentAsByteArray());
assertThat(edsResponse.getType()).isEqualTo("rpc");
assertThat(edsResponse.getMessage()).isNull();
assertThat(edsResponse.getWhere()).isNull();
assertThat(edsResponse.getTid()).isEqualTo(12);
assertThat(edsResponse.getAction()).isEqualTo("formInfoController");
assertThat(edsResponse.getMethod()).isEqualTo("updateInfoDirect");
@SuppressWarnings("unchecked")
Map<String, Object> result = (Map<String, Object>) edsResponse.getResult();
assertThat(result).hasSize(6).contains(entry("name", "RALPH"), entry("age", 30),
entry("admin", Boolean.FALSE), entry("salary", 1012.3),
entry("result", "theResultRESULT"), entry("success", Boolean.TRUE));
}