@Test public void sendCertificateTest() throws Exception { final String intygsId = "intygsId"; final Personnummer personId = createPnr("19121212-1212"); final String jsonBody = "jsonBody"; final String recipientId = "recipientId"; service.sendCertificate(intygsId, personId, jsonBody, recipientId); ArgumentCaptor<MessageCreator> messageCaptor = ArgumentCaptor.forClass(MessageCreator.class); verify(template).send(messageCaptor.capture()); Message res = messageCaptor.getValue().createMessage(session); assertEquals(Constants.SEND_MESSAGE, res.getStringProperty(Constants.MESSAGE_TYPE)); assertEquals(intygsId, res.getStringProperty(Constants.INTYGS_ID)); assertEquals(personId.getPersonnummer(), res.getStringProperty(Constants.PERSON_ID)); assertEquals(recipientId, res.getStringProperty(Constants.RECIPIENT)); assertEquals(LOGICAL_ADDRESS, res.getStringProperty(Constants.LOGICAL_ADDRESS)); assertNull(res.getStringProperty(Constants.DELAY_MESSAGE)); assertEquals(jsonBody, ((TextMessage) res).getText()); }
@Override public void sendCertificate(String intygsId, Personnummer personId, String jsonBody, String recipientId) { sendCertificate(intygsId, personId, jsonBody, recipientId, false); }
CertificateSenderServiceImpl implements CertificateSenderService { @Override public void sendCertificate(String intygsId, Personnummer personId, String jsonBody, String recipientId) { sendCertificate(intygsId, personId, jsonBody, recipientId, false); } }
CertificateSenderServiceImpl implements CertificateSenderService { @Override public void sendCertificate(String intygsId, Personnummer personId, String jsonBody, String recipientId) { sendCertificate(intygsId, personId, jsonBody, recipientId, false); }  }
CertificateSenderServiceImpl implements CertificateSenderService { @Override public void sendCertificate(String intygsId, Personnummer personId, String jsonBody, String recipientId) { sendCertificate(intygsId, personId, jsonBody, recipientId, false); }  @PostConstruct void checkJmsTemplate(); @Override void storeCertificate(String intygsId, String intygsTyp, String jsonBody); @Override void sendCertificate(String intygsId, Personnummer personId, String jsonBody, String recipientId); @Override void sendCertificate(String intygsId, Personnummer personId, String jsonBody, String recipientId, boolean delay); @Override void revokeCertificate(String intygsId, String xmlBody, String intygsTyp, String intygsTypVersion); @Override void sendMessageToRecipient(String intygsId, String xmlBody); @Override void sendRegisterApprovedReceivers(String intygsId, String intygsTyp, String jsonBody); }
CertificateSenderServiceImpl implements CertificateSenderService { @Override public void sendCertificate(String intygsId, Personnummer personId, String jsonBody, String recipientId) { sendCertificate(intygsId, personId, jsonBody, recipientId, false); }  @PostConstruct void checkJmsTemplate(); @Override void storeCertificate(String intygsId, String intygsTyp, String jsonBody); @Override void sendCertificate(String intygsId, Personnummer personId, String jsonBody, String recipientId); @Override void sendCertificate(String intygsId, Personnummer personId, String jsonBody, String recipientId, boolean delay); @Override void revokeCertificate(String intygsId, String xmlBody, String intygsTyp, String intygsTypVersion); @Override void sendMessageToRecipient(String intygsId, String xmlBody); @Override void sendRegisterApprovedReceivers(String intygsId, String intygsTyp, String jsonBody);  }