@Test
public void thatCanReachErrorInfoData() throws JSONException {

    JSONObject errorExtra = new JSONObject("{\n" +
            "        \"error\": {\n" +
            "          \"status\": 403,\n" +
            "          \"message\": \"You can not update an instance of a module that does not belong to you or does not exist\",\n" +
            "          \"extra\": {\n" +
            "              \"field\": \"amount\",\n" +
            "              \"error\": \"validator.8\",\n" +
            "              \"message\": \"Please check the text field, it should be a string\"\n" +
            "            },\n" +
            "          \"type\": \"HaloError\"\n" +
            "        }\n" +
            "      }");
    BatchOperationResult instance = new BatchOperationResult(BatchOperator.DELETE, 0, false, errorExtra);
    BatchError error = instance.getDataError();
    BatchErrorInfo errorInfo = error.getError();
    assertThat(errorInfo.getStatus()).isEqualTo(403);
    assertThat(errorInfo.getType()).isEqualTo("HaloError");
    assertThat(errorInfo.getMessage()).contains("belong to you or does not exist");
    assertThat(errorInfo.getExtra().toString()).contains("validator.8");
}