ProcessInstanceVariableMapper implements Function<VariableInstance, ProcessVariableSummary> { @Override public ProcessVariableSummary apply(final VariableInstance variableInstance) { if (variableInstance == null) { return null; } return new ProcessVariableSummary(variableInstance.getVariableName(), variableInstance.getVariableName(), variableInstance.getProcessInstanceId(), variableInstance.getOldValue(), variableInstance.getValue(), variableInstance.getDate().getTime(), type, deploymentId, serverTemplateId); } ProcessInstanceVariableMapper(String deploymentId, String serverTemplateId, String type); @Override ProcessVariableSummary apply(final VariableInstance variableInstance);  }
@Test public void testProcessInstanceVariableMapperMapNull() { final VariableInstance vi = null; final ProcessVariableSummary pivs = new ProcessInstanceVariableMapper(deploymentId, serverTemplateId, "").apply(vi); assertNull(pivs); }