@Test void testSendWebservice() throws FunctionalException { final Device device = this.createDevice(IntegrationType.WEB_SERVICE); when(this.deviceDomainService.searchDevice(anyString())).thenReturn(device); this.responseMessageRouter.send(MESSAGE, MESSAGE_TYPE); verify(this.webServiceResponseMessageSender).send(any(ResponseMessage.class), anyString()); }
@Override public void send(final ResponseMessage responseMessage, final String messageType) { final IntegrationType integrationType = this.getIntegrationType(responseMessage.getDeviceIdentification()); switch (integrationType) { case BOTH: this.kafkaResponseMessageSender.send(responseMessage, messageType); this.webServiceResponseMessageSender.send(responseMessage, messageType); break; case KAFKA: this.kafkaResponseMessageSender.send(responseMessage, messageType); break; default: this.webServiceResponseMessageSender.send(responseMessage, messageType); } }
ResponseMessageRouter implements NotificationResponseMessageSender { @Override public void send(final ResponseMessage responseMessage, final String messageType) { final IntegrationType integrationType = this.getIntegrationType(responseMessage.getDeviceIdentification()); switch (integrationType) { case BOTH: this.kafkaResponseMessageSender.send(responseMessage, messageType); this.webServiceResponseMessageSender.send(responseMessage, messageType); break; case KAFKA: this.kafkaResponseMessageSender.send(responseMessage, messageType); break; default: this.webServiceResponseMessageSender.send(responseMessage, messageType); } } }
ResponseMessageRouter implements NotificationResponseMessageSender { @Override public void send(final ResponseMessage responseMessage, final String messageType) { final IntegrationType integrationType = this.getIntegrationType(responseMessage.getDeviceIdentification()); switch (integrationType) { case BOTH: this.kafkaResponseMessageSender.send(responseMessage, messageType); this.webServiceResponseMessageSender.send(responseMessage, messageType); break; case KAFKA: this.kafkaResponseMessageSender.send(responseMessage, messageType); break; default: this.webServiceResponseMessageSender.send(responseMessage, messageType); } }  }
ResponseMessageRouter implements NotificationResponseMessageSender { @Override public void send(final ResponseMessage responseMessage, final String messageType) { final IntegrationType integrationType = this.getIntegrationType(responseMessage.getDeviceIdentification()); switch (integrationType) { case BOTH: this.kafkaResponseMessageSender.send(responseMessage, messageType); this.webServiceResponseMessageSender.send(responseMessage, messageType); break; case KAFKA: this.kafkaResponseMessageSender.send(responseMessage, messageType); break; default: this.webServiceResponseMessageSender.send(responseMessage, messageType); } }  @Override void send(final ResponseMessage responseMessage, final String messageType); }
ResponseMessageRouter implements NotificationResponseMessageSender { @Override public void send(final ResponseMessage responseMessage, final String messageType) { final IntegrationType integrationType = this.getIntegrationType(responseMessage.getDeviceIdentification()); switch (integrationType) { case BOTH: this.kafkaResponseMessageSender.send(responseMessage, messageType); this.webServiceResponseMessageSender.send(responseMessage, messageType); break; case KAFKA: this.kafkaResponseMessageSender.send(responseMessage, messageType); break; default: this.webServiceResponseMessageSender.send(responseMessage, messageType); } }  @Override void send(final ResponseMessage responseMessage, final String messageType);  }