Header implements InternalModelTransformer, Serializable { @Override public InternalModelObject transformToInternalModel() throws WorldpayModelTransformationException { com.worldpay.internal.model.Header intHeader = new com.worldpay.internal.model.Header(); intHeader.setApplicationData(applicationData); intHeader.setEphemeralPublicKey(ephemeralPublicKey); intHeader.setPublicKeyHash(publicKeyHash); intHeader.setTransactionId(transactionId); return intHeader; } Header(final String ephemeralPublicKey, final String publicKeyHash, final String transactionId, final String applicationData); @Override InternalModelObject transformToInternalModel();  }
@Test public void shouldTransformToInternalModel() throws WorldpayModelTransformationException { final com.worldpay.internal.model.Header result = (com.worldpay.internal.model.Header) testObj.transformToInternalModel(); assertThat(result.getApplicationData()).isEqualTo(APPLICATION_DATA); assertThat(result.getEphemeralPublicKey()).isEqualTo(EPHEMERAL_PUBLIC_KEY); assertThat(result.getPublicKeyHash()).isEqualTo(PUBLIC_KEY_HASH); assertThat(result.getTransactionId()).isEqualTo(TRANSACTION_ID); }