### Question:
LoadFileInput extends BaseTransform<LoadFileInputMeta, LoadFileInputData> implements ITransform<LoadFileInputMeta, LoadFileInputData> { protected Object[] copyOrCloneArrayFromLoadFile( Object[] outputRowData, Object[] readrow ) { if ( readrow.length <= outputRowData.length ) { System.arraycopy( readrow, 0, outputRowData, 0, readrow.length ); } else { outputRowData = readrow.clone(); } return outputRowData; } LoadFileInput( TransformMeta transformMeta, LoadFileInputMeta meta, LoadFileInputData data, int copyNr, PipelineMeta pipelineMeta,
                        Pipeline pipeline ); boolean processRow(); static byte[] getFileBinaryContent( String vfsFilename ); boolean init(); void dispose();  }### Answer:
@Test public void testCopyOrCloneArrayFromLoadFileWithSmallerSizedReadRowArray() { int size = 5; Object[] rowData = new Object[ size ]; Object[] readrow = new Object[ size - 1 ]; LoadFileInput loadFileInput = mock( LoadFileInput.class ); Mockito.when( loadFileInput.copyOrCloneArrayFromLoadFile( rowData, readrow ) ).thenCallRealMethod(); assertEquals( 5, loadFileInput.copyOrCloneArrayFromLoadFile( rowData, readrow ).length ); }
@Test public void testCopyOrCloneArrayFromLoadFileWithBiggerSizedReadRowArray() { int size = 5; Object[] rowData = new Object[ size ]; Object[] readrow = new Object[ size + 1 ]; LoadFileInput loadFileInput = mock( LoadFileInput.class ); Mockito.when( loadFileInput.copyOrCloneArrayFromLoadFile( rowData, readrow ) ).thenCallRealMethod(); assertEquals( 6, loadFileInput.copyOrCloneArrayFromLoadFile( rowData, readrow ).length ); }
@Test public void testCopyOrCloneArrayFromLoadFileWithSameSizedReadRowArray() { int size = 5; Object[] rowData = new Object[ size ]; Object[] readrow = new Object[ size ]; LoadFileInput loadFileInput = mock( LoadFileInput.class ); Mockito.when( loadFileInput.copyOrCloneArrayFromLoadFile( rowData, readrow ) ).thenCallRealMethod(); assertEquals( 5, loadFileInput.copyOrCloneArrayFromLoadFile( rowData, readrow ).length ); }