ProcessInstanceVariableMapper implements Function<VariableInstance, ProcessVariableSummary> { public ProcessInstanceVariableMapper(String deploymentId, String serverTemplateId, String type) { this.deploymentId = deploymentId; this.serverTemplateId = serverTemplateId; this.type = type; } ProcessInstanceVariableMapper(String deploymentId, String serverTemplateId, String type); @Override ProcessVariableSummary apply(final VariableInstance variableInstance);  }
@Test public void testProcessInstanceVariableMapperTest() { final VariableInstance vi = VariableInstance.builder() .name("variableName") .processInstanceId(1L) .value("variableNewValue") .oldValue("variableOldValue") .date(new Date()) .build(); final ProcessVariableSummary pivs = new ProcessInstanceVariableMapper(deploymentId, serverTemplateId, varType).apply(vi); assertVariableInstance(vi, pivs); assertEquals(deploymentId, pivs.getDeploymentId()); assertEquals(serverTemplateId, pivs.getServerTemplateId()); assertEquals(varType, pivs.getType()); }