### Question:
BinaryObject extends RepositoryObject { public String getMimetype() throws FedoraException { if (mimetype == null) { mimetype = getResource().getProperty(Ebucore.hasMimeType).getString(); } return mimetype; } 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 testGetMimetype() { binObj.setMimetype("text/plain"); assertEquals("text/plain", binObj.getMimetype()); binObj.setMimetype(null); resource.addProperty(Ebucore.hasMimeType, "application/json"); assertEquals("application/json", binObj.getMimetype()); }