@Test public void unsupportedTypeThrowsException() { validationRequest = MockValidationRequestBuilder.aValidationRequest().withType("unsupported").build(); expectedException.expect(RuntimeException.class); expectedException.expectMessage("type = unsupported is unsupported"); transformer.transform(validationRequest); }
public ProxyDocument transform(ValidationRequest validationRequest) { ProxyDocument proxyDocument = new ProxyDocument(); proxyDocument.setName(validationRequest.getFilename()); proxyDocument.setBytes(Base64.decodeBase64(validationRequest.getDocument())); proxyDocument.setSignaturePolicy(validationRequest.getSignaturePolicy()); setDocumentType(validationRequest, proxyDocument); setReportType(validationRequest, proxyDocument); return proxyDocument; }
ValidationRequestToProxyDocumentTransformer { public ProxyDocument transform(ValidationRequest validationRequest) { ProxyDocument proxyDocument = new ProxyDocument(); proxyDocument.setName(validationRequest.getFilename()); proxyDocument.setBytes(Base64.decodeBase64(validationRequest.getDocument())); proxyDocument.setSignaturePolicy(validationRequest.getSignaturePolicy()); setDocumentType(validationRequest, proxyDocument); setReportType(validationRequest, proxyDocument); return proxyDocument; } }
ValidationRequestToProxyDocumentTransformer { public ProxyDocument transform(ValidationRequest validationRequest) { ProxyDocument proxyDocument = new ProxyDocument(); proxyDocument.setName(validationRequest.getFilename()); proxyDocument.setBytes(Base64.decodeBase64(validationRequest.getDocument())); proxyDocument.setSignaturePolicy(validationRequest.getSignaturePolicy()); setDocumentType(validationRequest, proxyDocument); setReportType(validationRequest, proxyDocument); return proxyDocument; }  }
ValidationRequestToProxyDocumentTransformer { public ProxyDocument transform(ValidationRequest validationRequest) { ProxyDocument proxyDocument = new ProxyDocument(); proxyDocument.setName(validationRequest.getFilename()); proxyDocument.setBytes(Base64.decodeBase64(validationRequest.getDocument())); proxyDocument.setSignaturePolicy(validationRequest.getSignaturePolicy()); setDocumentType(validationRequest, proxyDocument); setReportType(validationRequest, proxyDocument); return proxyDocument; }  ProxyDocument transform(ValidationRequest validationRequest); }
ValidationRequestToProxyDocumentTransformer { public ProxyDocument transform(ValidationRequest validationRequest) { ProxyDocument proxyDocument = new ProxyDocument(); proxyDocument.setName(validationRequest.getFilename()); proxyDocument.setBytes(Base64.decodeBase64(validationRequest.getDocument())); proxyDocument.setSignaturePolicy(validationRequest.getSignaturePolicy()); setDocumentType(validationRequest, proxyDocument); setReportType(validationRequest, proxyDocument); return proxyDocument; }  ProxyDocument transform(ValidationRequest validationRequest);  }