### Question:
JoinRows extends BaseTransform<JoinRowsMeta, JoinRowsData> implements ITransform<JoinRowsMeta, JoinRowsData> { public boolean processRow() throws HopException { if ( first ) { first = false; initialize(); } if ( data.caching ) { if ( !cacheInputRow() ) { return false; } } else { if ( !outputRow() ) { return false; } } return true; } JoinRows(TransformMeta transformMeta, JoinRowsMeta meta, JoinRowsData data, int copyNr, PipelineMeta pipelineMeta,
                  Pipeline pipeline ); @SuppressWarnings( "unchecked" ) void initialize(); Object[] getRowData( int filenr ); boolean processRow(); void dispose(); @Override void batchComplete();  }### Answer:
@Test @Ignore public void testJoinRowsTransform() throws Exception { JoinRowsMeta joinRowsMeta = new JoinRowsMeta(); joinRowsMeta.setMainTransformName( "main transform name" ); joinRowsMeta.setPrefix( "out" ); joinRowsMeta.setCacheSize( 3 ); JoinRowsData joinRowsData = new JoinRowsData(); JoinRows joinRows = getJoinRows(); joinRows.init(); List<IRowSet> rowSets = new ArrayList<>(); rowSets.add( getRowSetWithData( 3, "main --", true ) ); rowSets.add( getRowSetWithData( 3, "secondary --", false ) ); joinRows.setInputRowSets( rowSets ); TransformRowsCollector rowTransformCollector = new TransformRowsCollector(); joinRows.addRowListener( rowTransformCollector ); joinRows.getLogChannel().setLogLevel( LogLevel.ROWLEVEL ); HopLogStore.init(); while ( true ) { if ( !joinRows.processRow()) { break; } } rowTransformCollector.getRowsWritten(); assertEquals( 9, rowTransformCollector.getRowsWritten().size() ); assertEquals( 6, rowTransformCollector.getRowsRead().size() ); Object[][] expectedResult = createExpectedResult(); List<Object[]> rowWritten = rowTransformCollector.getRowsWritten().stream().map( RowMetaAndData::getData ).collect( Collectors.toList() ); for ( int i = 0; i < 9; i++ ) { assertTrue( Arrays.equals( expectedResult[ i ], rowWritten.get( i ) ) ); } }