### Question:
ArchivedCaseContextResource extends CommonResource { private Serializable getContextResultElement(Serializable executionContextElementValue) { return resourceHandler.getContextResultElement(executionContextElementValue); } ArchivedCaseContextResource(final ProcessAPI processAPI, FinderFactory resourceHandler); @Get("json") Map<String, Serializable> getArchivedCaseContext();  }### Answer:
@Test public void should_return_a_context_of_type_SingleBusinessDataRef_for_a_given_archived_case() throws Exception { final Map<String, Serializable> context = new HashMap<String, Serializable>(); String engineResult = "object returned by engine"; context.put("Ticket", engineResult); when(processAPI.getArchivedProcessInstanceExecutionContext(2L)).thenReturn(context); doReturn("clientResult").when(finderFactory).getContextResultElement(engineResult); final Response response = request("/bpm/archivedCase/2/context").get(); assertThat(response).hasStatus(Status.SUCCESS_OK); assertThat(response).hasJsonEntityEqualTo("{\"Ticket\":\"clientResult\"}"); }