### Question:
CaseVariableDatastore extends CommonDatastore<CaseVariableItem, DataInstance> implements DatastoreHasSearch<CaseVariableItem>, DatastoreHasUpdate<CaseVariableItem> { public void updateVariableValue(final long caseId, final String variableName, final String className, final String newValue) { try { final Serializable converteValue = converter.convert(className, newValue); getEngineProcessAPI().updateProcessDataInstance(variableName, caseId, converteValue); } catch (final Exception e) { throw new APIException("Error when updating case variable", e); } } CaseVariableDatastore(final APISession engineSession); @Override CaseVariableItem update(final APIID id, final Map<String, String> attributes); @Override ItemSearchResult<CaseVariableItem> search(final int page, final int resultsByPage, final String search, final String orders,
            final Map<String, String> filters); void updateVariableValue(final long caseId, final String variableName, final String className, final String newValue); ItemSearchResult<CaseVariableItem> findByCaseId(final long caseId, final int page, final int resultsByPage); CaseVariableItem findById(final long caseId, final String variableName);  }### Answer:
@Test public void testUpdateVariableValue() throws Exception { long caseId = 1L; String name = "aName"; String newValue = "newValue"; datastore.updateVariableValue(caseId, name, String.class.getName(), newValue); verify(processAPI).updateProcessDataInstance(name, caseId, newValue); }