### Question:
BinaryObject extends RepositoryObject { public InputStream getBinaryStream() throws FedoraException { return driver.getBinaryStream(this); } protected  BinaryObject(PID pid, RepositoryObjectDriver driver,
            RepositoryObjectFactory repoObjFactory); protected  BinaryObject(PID pid, URI contentUri, RepositoryObjectDriver driver,
            RepositoryObjectFactory repoObjFactory); @Override BinaryObject validateType(); @Override RepositoryObject getParent(); InputStream getBinaryStream(); URI getContentUri(); @Override URI getMetadataUri(); String getFilename(); void setFilename(String filename); String getMimetype(); void setMimetype(String mimetype); String getSha1Checksum(); String getMd5Checksum(); void setSha1Checksum(String sha1); void setMd5Checksum(String md5); Long getFilesize(); void setFilesize(Long filesize);  }### Answer:
@Test public void testGetBinaryStream() { when(driver.getBinaryStream(binObj)).thenReturn(stream); assertEquals(binObj.getBinaryStream(), stream); }