### Question:
DataFile implements Serializable { public String getName() { String documentName = document.getName(); String name = new File(documentName).getName(); logger.trace("File name: for document " + documentName + " is " + name); return name; } DataFile(String path, String mimeType);  DataFile(byte[] data, String fileName, String mimeType);  DataFile(InputStream stream, String fileName, String mimeType); protected  DataFile(DSSDocument document);  DataFile(); byte[] calculateDigest(); byte[] calculateDigest(URL method); byte[] calculateDigest(org.digidoc4j.DigestAlgorithm digestType); String getName(); String getId(); long getFileSize(); String getMediaType(); void setMediaType(String mediaType); void saveAs(OutputStream out); void saveAs(String path); byte[] getBytes(); InputStream getStream(); void setId(String dataFileId); DSSDocument getDocument(); void setDocument(DSSDocument document);  }### Answer:
@Test public void testGetFileName() throws Exception { Assert.assertEquals("test.txt", this.dataFile.getName()); }
@Test public void testInMemoryDocumentRetrievesFileName() { DataFile dataFile = new DataFile(new byte[]{0x041}, "suura.txt", "text/plain"); Assert.assertEquals("suura.txt", dataFile.getName()); }