ProcessInstanceLogSummaryDataSetMapper implements BiFunction<DataSet, Integer, ProcessInstanceLogSummary> { @Override public ProcessInstanceLogSummary apply(final DataSet dataSet, final Integer row) { return ProcessInstanceLogSummary.builder() .id(getColumnLongValue(dataSet, COLUMN_LOG_ID, row)) .nodeId(getColumnStringValue(dataSet, COLUMN_LOG_NODE_ID, row)) .name(getColumnStringValue(dataSet, COLUMN_LOG_NODE_NAME, row)) .nodeType(getColumnStringValue(dataSet, COLUMN_LOG_NODE_TYPE, row)) .logDeploymentId(getColumnStringValue(dataSet, COLUMN_LOG_DEPLOYMENT_ID, row)) .date(getColumnDateValue(dataSet, COLUMN_LOG_DATE, row)) .completed(getColumnIntValue(dataSet, COLUMN_LOG_TYPE, row).equals(LogUtils.NODE_COMPLETED)) .workItemId(getColumnLongValue(dataSet, COLUMN_LOG_WORK_ITEM_ID, row)) .referenceId(getColumnLongValue(dataSet, COLUMN_LOG_REFERENCE_ID, row)) .nodeContainerId(getColumnStringValue(dataSet, COLUMN_LOG_NODE_CONTAINER_ID, row)) .build(); }  @Override ProcessInstanceLogSummary apply(final DataSet dataSet,
                                           final Integer row);  }
@Test public void testDataSetQueryHelperColumnMapping() { final Long logId = Long.valueOf(55); final Date logDate = new Date(); final String nodeName = "nodeName"; final String nodeType = "nodeType"; final int type = 1; DataSet dataSet = mock(DataSet.class); defineDatasetAnswer(dataSet, 0, logId, logDate, nodeName, nodeType, type); ProcessInstanceLogSummary rls = new ProcessInstanceLogSummaryDataSetMapper().apply(dataSet, 0); assertEquals(logId, rls.getId()); assertEquals(logDate, rls.getDate()); assertEquals(nodeName, rls.getName()); assertEquals(nodeType, rls.getNodeType()); assertTrue(rls.isCompleted()); }