### Question:
AgileHelper { public static int getCsvSampleRowSize() { String sampleSize = PentahoSystem.getSystemSetting( SETTINGS_FILE, CSV_SAMPLE_SIZE, null ); if ( sampleSize != null ) { return Integer.valueOf( sampleSize ); } else { return 100; } }  static String getSchemaName(); static String getDatasourceSolutionStorage(); static String getDialect( DatabaseMeta meta, String jndiName ); static String getDialect( DatabaseMeta meta ); static String generateTableName( String filename ); static String getJndiName(); static int getCsvSampleRowSize(); static DatabaseMeta getDatabaseMeta(); static Connection getConnection( String jndiName ); static String getFolderPath( String project ); static String getTmpFolderPath( String project ); static String getProjectMetadataFolder( String project ); static final String PLUGIN_NAME; }### Answer:
@Test public void testGetCsvSampleRowSize() { int defaultRowSize = 100; int expected = Integer.MAX_VALUE; PentahoSystem.setSystemSettingsService( null ); assertEquals( defaultRowSize, AgileHelper.getCsvSampleRowSize() ); ISystemSettings systemSettings = mock( ISystemSettings.class ); when( systemSettings.getSystemSetting( anyString(), anyString(), anyString() ) ).thenReturn( null ).thenReturn( String.valueOf( expected ) ); PentahoSystem.setSystemSettingsService( systemSettings ); assertEquals( defaultRowSize, AgileHelper.getCsvSampleRowSize() ); assertEquals( expected, AgileHelper.getCsvSampleRowSize() ); }