@Test
public void testGetJsonBodyForSingleMapObject() throws IOException, ServletException {

  final HttpServletRequest httpRequest = Mockito.mock(HttpServletRequest.class);
  final String originalString =
      "  {\n" + "    \"action\": \"update\",\n" + "    \"table\": \"ramp\",\n"
          + "    \"conditions\" : {\n" + "      \"rampId\" : \"dali\"\n" + "    },\n"
          + "    \"values\": {\n"
          + "      \"rampStage\": 2,\n" + "      \"lastUpdatedTime\": 1566259437000\n" + "    }\n"
          + "  }\n";
  final InputStream inputStream = new ByteArrayInputStream(originalString.getBytes(UTF_8));
  final InputStreamReader inputStreamReader = new InputStreamReader(inputStream, UTF_8);
  final BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
  Mockito.when(httpRequest.getReader()).thenReturn(bufferedReader);
  final Object object = HttpRequestUtils.getJsonBody(httpRequest);
  Assert.assertTrue(object instanceof Map);
  final Map<String, Object> singleObj = (Map<String, Object>) object;
  Assert.assertEquals(singleObj.get("action").toString(), "update");
  Assert.assertEquals(singleObj.get("table").toString(), "ramp");
  Assert
      .assertEquals(((Map<String, Object>) singleObj.get("conditions")).get("rampId").toString(),
          "dali");
  Assert.assertEquals(((Map<String, Object>) singleObj.get("values")).get("rampStage"), 2);
  Assert.assertEquals(((Map<String, Object>) singleObj.get("values")).get("lastUpdatedTime"),
      1566259437000L);
}