@Test public void replaceWinEOLtest() { String content = "#!/bin/bash\r\n" + "\r\n" + "echo `date` > /home/pentaho/test_output/output.txt"; doCallRealMethod().when( jobEntryShellMock ).replaceWinEOL( anyString() ); content = jobEntryShellMock.replaceWinEOL( content ); verify( jobEntryShellMock ).replaceWinEOL( anyString() ); String assertionFailedMessage = "Windows EOL character is detected"; Assert.assertFalse( assertionFailedMessage, content.contains( "\r\n" ) ); Assert.assertFalse( assertionFailedMessage, content.contains( "\r" ) ); }
@VisibleForTesting String replaceWinEOL( String input ) { String result = input; result = result.replaceAll( "\\r\\n?", "\n" ); return result; }
JobEntryShell extends JobEntryBase implements Cloneable, JobEntryInterface { @VisibleForTesting String replaceWinEOL( String input ) { String result = input; result = result.replaceAll( "\\r\\n?", "\n" ); return result; } }
JobEntryShell extends JobEntryBase implements Cloneable, JobEntryInterface { @VisibleForTesting String replaceWinEOL( String input ) { String result = input; result = result.replaceAll( "\\r\\n?", "\n" ); return result; } JobEntryShell( String name );  JobEntryShell(); }
JobEntryShell extends JobEntryBase implements Cloneable, JobEntryInterface { @VisibleForTesting String replaceWinEOL( String input ) { String result = input; result = result.replaceAll( "\\r\\n?", "\n" ); return result; } JobEntryShell( String name );  JobEntryShell(); void allocate( int nrFields ); Object clone(); String getXML(); void loadXML( Node entrynode, List<DatabaseMeta> databases, List<SlaveServer> slaveServers,
    Repository rep, IMetaStore metaStore ); void loadRep( Repository rep, IMetaStore metaStore, ObjectId id_jobentry, List<DatabaseMeta> databases,
    List<SlaveServer> slaveServers ); void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_job ); void clear(); @Deprecated void setFileName( String n ); void setFilename( String n ); String getFilename(); String getRealFilename(); void setWorkDirectory( String n ); String getWorkDirectory(); void setScript( String scriptin ); String getScript(); String getLogFilename(); Result execute( Result result, int nr ); boolean evaluates(); boolean isUnconditional(); List<ResourceReference> getResourceDependencies( JobMeta jobMeta ); @Override void check( List<CheckResultInterface> remarks, JobMeta jobMeta, VariableSpace space,
    Repository repository, IMetaStore metaStore ); }
JobEntryShell extends JobEntryBase implements Cloneable, JobEntryInterface { @VisibleForTesting String replaceWinEOL( String input ) { String result = input; result = result.replaceAll( "\\r\\n?", "\n" ); return result; } JobEntryShell( String name );  JobEntryShell(); void allocate( int nrFields ); Object clone(); String getXML(); void loadXML( Node entrynode, List<DatabaseMeta> databases, List<SlaveServer> slaveServers,
    Repository rep, IMetaStore metaStore ); void loadRep( Repository rep, IMetaStore metaStore, ObjectId id_jobentry, List<DatabaseMeta> databases,
    List<SlaveServer> slaveServers ); void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_job ); void clear(); @Deprecated void setFileName( String n ); void setFilename( String n ); String getFilename(); String getRealFilename(); void setWorkDirectory( String n ); String getWorkDirectory(); void setScript( String scriptin ); String getScript(); String getLogFilename(); Result execute( Result result, int nr ); boolean evaluates(); boolean isUnconditional(); List<ResourceReference> getResourceDependencies( JobMeta jobMeta ); @Override void check( List<CheckResultInterface> remarks, JobMeta jobMeta, VariableSpace space,
    Repository repository, IMetaStore metaStore ); public String[] arguments; public boolean argFromPrevious; public boolean setLogfile; public String logfile; public boolean addDate; public LogLevel logFileLevel; public boolean execPerRow; public boolean setAppendLogfile; public boolean insertScript; public String script; }