ByteArrayUploadDataProvider extends UploadDataProvider { @Override public long getLength() { return data.length; } ByteArrayUploadDataProvider(byte[] data); @Override long getLength(); @Override void read(UploadDataSink uploadDataSink, ByteBuffer byteBuffer); @Override void rewind(UploadDataSink uploadDataSink);  }
@Test public void testGetLength() { assertThat(byteArrayUploadDataProvider.getLength()).isEqualTo(TEST_DATA.length); }