### Question:
GetRepositoryNames extends BaseStep implements StepInterface { @Override public boolean init( StepMetaInterface smi, StepDataInterface sdi ) { meta = (GetRepositoryNamesMeta) smi; data = (GetRepositoryNamesData) sdi; if ( super.init( smi, sdi ) ) { try { data.list = getRepositoryObjects(); } catch ( Exception e ) { logError( "Error initializing step: ", e ); return false; } data.rownr = 1L; data.filenr = 0; return true; } return false; } GetRepositoryNames( StepMeta stepMeta, StepDataInterface stepDataInterface, int copyNr, TransMeta transMeta,
      Trans trans ); @Override boolean processRow( StepMetaInterface smi, StepDataInterface sdi ); @Override boolean init( StepMetaInterface smi, StepDataInterface sdi );  }### Answer:
@Test public void testGetRepoList_includeSubfolders() throws KettleException { init( repo, "/", true, ".*", "", All, 4 ); }
@Test public void testGetRepoList_excludeSubfolders() throws KettleException { init( repo, "/", false, ".*", "", All, 0 ); }
@Test public void testGetRepoList_transOnly() throws KettleException { init( repo, "/", true, ".*", "", Transformations, 2 ); }
@Test public void testGetRepoList_jobsOnly() throws KettleException { init( repo, "/", true, ".*", "", Jobs, 2 ); }
@Test public void testGetRepoList_nameMask() throws KettleException { init( repo, "/", true, "Trans.*", "", All, 2 ); }
@Test public void testGetRepoList_withoutNameMask() throws KettleException { init( repo, "/", true, "", "", All, 4 ); }
@Test public void testGetRepoList_excludeNameMask() throws KettleException { init( repo, "/", true, ".*", "Trans1.*", All, 3 ); }
@Test public void testGetRepoList_includeSubfolders_Extended() throws KettleException { init( repoExtended, "/", true, ".*", "", All, 4 ); }
@Test public void testGetRepoList_excludeSubfolders_Extended() throws KettleException { init( repoExtended, "/", false, ".*", "", All, 0 ); }
@Test public void testGetRepoList_transOnly_Extended() throws KettleException { init( repoExtended, "/", true, ".*", "", Transformations, 2 ); }
@Test public void testGetRepoList_jobsOnly_Extended() throws KettleException { init( repoExtended, "/", true, ".*", "", Jobs, 2 ); }
@Test public void testGetRepoList_nameMask_Extended() throws KettleException { init( repoExtended, "/", true, "Trans.*", "", All, 2 ); }
@Test public void testGetRepoList_withoutNameMask_Extended() throws KettleException { init( repoExtended, "/", true, "", "", All, 4 ); }
@Test public void testGetRepoList_excludeNameMask_Extended() throws KettleException { init( repoExtended, "/", true, ".*", "Trans1.*", All, 3 ); }
@Test public void testShowHidden() throws KettleException { IUser user = Mockito.mock( IUser.class ); Mockito.when( user.isAdmin() ).thenReturn( true ); Mockito.when( repoExtended.getUserInfo() ).thenReturn( user ); init( repoExtended, "/", false, ".*", "", All, 0 ); Mockito.verify( repoExtended, Mockito.never() ) .loadRepositoryDirectoryTree( Mockito.anyString(), Mockito.anyString(), Mockito.anyInt(), Mockito.eq( false ), Mockito.anyBoolean(), anyBoolean() ); Mockito.when( user.isAdmin() ).thenReturn( false ); init( repoExtended, "/", false, ".*", "", All, 0 ); Mockito.verify( repoExtended ) .loadRepositoryDirectoryTree( Mockito.anyString(), Mockito.anyString(), Mockito.anyInt(), Mockito.eq( false ), Mockito.anyBoolean(), Mockito.anyBoolean() ); }