S3FileSystem extends S3CommonFileSystem { public int getPartSize() { long parsedPartSize = parsePartSize( s3KettleProperty.getPartSize() ); return convertToInt( parsedPartSize ); } protected  S3FileSystem( final FileName rootName, final FileSystemOptions fileSystemOptions ); protected  S3FileSystem( final FileName rootName, final FileSystemOptions fileSystemOptions,
                          final StorageUnitConverter storageUnitConverter, final S3KettleProperty s3KettleProperty ); int getPartSize();  }
@Test public void getPartSize() throws Exception { S3FileSystem s3FileSystem = getTestInstance(); s3FileSystem.storageUnitConverter = new StorageUnitConverter(); S3KettleProperty s3KettleProperty = mock( S3KettleProperty.class ); when( s3KettleProperty.getPartSize() ).thenReturn( "6MB" ); s3FileSystem.s3KettleProperty = s3KettleProperty; assertEquals( 6 * 1024 * 1024, s3FileSystem.getPartSize() ); when( s3KettleProperty.getPartSize() ).thenReturn( "600GB" ); assertEquals( Integer.MAX_VALUE, s3FileSystem.getPartSize() ); }