@Test @PrepareForTest(KodoOutputStream.class) public void testFlush() throws Exception { PowerMockito.whenNew(BufferedOutputStream.class) .withArguments(Mockito.any(DigestOutputStream.class)).thenReturn(mLocalOutputStream); KodoOutputStream stream = new KodoOutputStream("testKey", mKodoClient, sTmpDirs); stream.flush(); stream.close(); Mockito.verify(mLocalOutputStream).flush(); }
@Override public void flush() throws IOException { mLocalOutputStream.flush(); }
KodoOutputStream extends OutputStream { @Override public void flush() throws IOException { mLocalOutputStream.flush(); } }
KodoOutputStream extends OutputStream { @Override public void flush() throws IOException { mLocalOutputStream.flush(); } KodoOutputStream(String key, KodoClient kodoClient, List<String> tmpDirs); }
KodoOutputStream extends OutputStream { @Override public void flush() throws IOException { mLocalOutputStream.flush(); } KodoOutputStream(String key, KodoClient kodoClient, List<String> tmpDirs); @Override void write(int b); @Override void write(byte[] b); @Override void write(byte[] b, int off, int len); @Override void flush(); @Override void close(); }
KodoOutputStream extends OutputStream { @Override public void flush() throws IOException { mLocalOutputStream.flush(); } KodoOutputStream(String key, KodoClient kodoClient, List<String> tmpDirs); @Override void write(int b); @Override void write(byte[] b); @Override void write(byte[] b, int off, int len); @Override void flush(); @Override void close();  }