### Question:
ActivityEngineClient { public DataInstance getDataInstance(String dataName, long activityId) { try { return processAPI.getActivityDataInstance(dataName, activityId); } catch (DataNotFoundException e) { throw new APIException(new _("Unable to find data instance %dataName% for activity %activityId%", new Arg("dataName", dataName), new Arg("activityId", activityId)), e); } } ActivityEngineClient(ProcessAPI processAPI); long countFailedActivities(); DataInstance getDataInstance(String dataName, long activityId); void updateVariables(long activityId, HashMap<String, Serializable> variables);  }### Answer:
@Test(expected = APIException.class) public void getDataInstance_throw_exception_if_data_is_not_found() throws Exception { when(processAPI.getActivityDataInstance(anyString(), anyLong())).thenThrow(new DataNotFoundException(new NullPointerException())); activityEngineClient.getDataInstance("aName", 1L); }