### Question:
B2UploadProgressAdapter implements B2ByteProgressListener { @Override public void hitException(Exception e, long nBytesSoFar) { final B2UploadProgress progress = new B2UploadProgress( partIndex, partCount, startByte, length, nBytesSoFar, B2UploadState.FAILED ); uploadListener.progress(progress); } B2UploadProgressAdapter(B2UploadListener uploadListener,
                            int partIndex,
                            int partCount,
                            long startByte,
                            long length); @Override void progress(long nBytesSoFar); @Override void hitException(Exception e,
                             long nBytesSoFar); @Override void reachedEof(long nBytesSoFar);  }### Answer:
@Test public void hitException() throws Exception { final RuntimeException e = new RuntimeException("testing"); adapter.hitException(e, 6); assertEquals("B2UploadProgress{partIndex=1, partCount=2, startByte=3, length=4, bytesSoFar=6, state=FAILED}", getProgressString()); }