### Question:
ConnectorQueryParser { public ConnectorQueryData transformLogicalWorkFlow(Project logicalWorkFlow) throws UnsupportedException, ExecutionException { ConnectorQueryData queryData = new ConnectorQueryData(); LogicalStep lStep = logicalWorkFlow; do { if (lStep instanceof Project) { if (!queryData.hasProjection()) { queryData.setProjection((Project) lStep); } else { throw new ExecutionException(" # Project > 1"); } } else if (lStep instanceof Filter) { Filter step = (Filter) lStep; if (Operator.MATCH == step.getRelation().getOperator()) { queryData.addMatch((Filter) lStep); } else { queryData.addFilter((Filter) lStep); } } else if (lStep instanceof Select) { queryData.setSelect((Select) lStep); } else if (lStep instanceof Limit) { queryData.setLimit((Limit) lStep); } else { throw new UnsupportedException("LogicalStep [" + lStep.getClass().getCanonicalName() + " not supported"); } lStep = lStep.getNextStep(); } while (lStep != null); checkSupportedQuery(queryData); return queryData; }  ConnectorQueryData transformLogicalWorkFlow(Project logicalWorkFlow);  }### Answer:
@Test public void testTransformSimpleWorkFlow() throws Exception { Project logicalWorkflow = createLogicalWorkFlow(); ConnectorQueryData queryData = queryParser.transformLogicalWorkFlow(logicalWorkflow); Collection<Filter> filters = queryData.getFilter(); assertNotNull("The filter is not null", filters); assertEquals("The filter size is correct", 1, filters.size()); Filter filter = (Filter) filters.toArray()[0]; assertEquals("The filter operation is correct", Operations.FILTER_FUNCTION_EQ, filter.getOperations().iterator().next()); assertEquals("The left term is type correct,", ColumnSelector.class.getCanonicalName(), filter.getRelation().getLeftTerm().getClass().getCanonicalName()); assertEquals("The filter table is correct", TYPE_NAME, ((ColumnSelector) filter.getRelation().getLeftTerm()).getName().getTableName().getName()); assertEquals("The operator is correct", Operator.EQ, filter.getRelation().getOperator()); assertEquals("The right term is correct", STRING_COLUMN_VALUE, ((StringSelector) filter.getRelation().getRightTerm()).getValue()); Project projection = queryData.getProjection(); assertNotNull("The projection is not null", projection); assertEquals("The type in the projection is correct", TYPE_NAME, projection.getTableName().getName()); assertEquals("The index in the projection is correct", INDEX_NAME, projection.getTableName().getCatalogName().getName()); }