@Test public void contentIsCorrectlyTransformedToBytes() { ProxyDocument proxyDocument = transformer.transform(dataFilesRequest); assertEquals(dataFilesRequest.getDocument(), Base64.encodeBase64String(proxyDocument.getBytes())); }
public ProxyDocument transform(DataFilesRequest dataFilesRequest) { ProxyDocument proxyDocument = new ProxyDocument(); proxyDocument.setName(dataFilesRequest.getFilename()); proxyDocument.setBytes(Base64.decodeBase64(dataFilesRequest.getDocument())); return proxyDocument; }
DataFilesRequestToProxyDocumentTransformer { public ProxyDocument transform(DataFilesRequest dataFilesRequest) { ProxyDocument proxyDocument = new ProxyDocument(); proxyDocument.setName(dataFilesRequest.getFilename()); proxyDocument.setBytes(Base64.decodeBase64(dataFilesRequest.getDocument())); return proxyDocument; } }
DataFilesRequestToProxyDocumentTransformer { public ProxyDocument transform(DataFilesRequest dataFilesRequest) { ProxyDocument proxyDocument = new ProxyDocument(); proxyDocument.setName(dataFilesRequest.getFilename()); proxyDocument.setBytes(Base64.decodeBase64(dataFilesRequest.getDocument())); return proxyDocument; }  }
DataFilesRequestToProxyDocumentTransformer { public ProxyDocument transform(DataFilesRequest dataFilesRequest) { ProxyDocument proxyDocument = new ProxyDocument(); proxyDocument.setName(dataFilesRequest.getFilename()); proxyDocument.setBytes(Base64.decodeBase64(dataFilesRequest.getDocument())); return proxyDocument; }  ProxyDocument transform(DataFilesRequest dataFilesRequest); }
DataFilesRequestToProxyDocumentTransformer { public ProxyDocument transform(DataFilesRequest dataFilesRequest) { ProxyDocument proxyDocument = new ProxyDocument(); proxyDocument.setName(dataFilesRequest.getFilename()); proxyDocument.setBytes(Base64.decodeBase64(dataFilesRequest.getDocument())); return proxyDocument; }  ProxyDocument transform(DataFilesRequest dataFilesRequest);  }