test_class.declarator: textMessage
test_class.modifier: @Mocked
      private
test_class.original_string: @Mocked
      private Message textMessage;
test_class.type: Message
test_class.var_name: textMessage
test_class.declarator: guestModelRepository
test_class.modifier: @Mocked
      private
test_class.original_string: @Mocked
      private GuestModelRepository guestModelRepository;
test_class.type: GuestModelRepository
test_class.var_name: guestModelRepository
test_class.file: booking/src/test/java/org/koenighotze/jee7hotel/booking/business/GuestDataUpdateReceiverTest.java
test_class.identifier: GuestDataUpdateReceiverTest
test_case.body: @Test
      public void invalid_messages_are_not_stored() throws JMSException {
          GuestDataUpdateReceiver receiver = new GuestDataUpdateReceiver(guestModelRepository);
  
          final String messagePayload = "CRAP";
  
          new Expectations() {{
              textMessage.getBody(String.class);
              result = messagePayload;
          }};
  
          receiver.onMessage(textMessage);
  
          new Verifications() {{
              guestModelRepository.storeGuestModel(withInstanceOf(GuestModel.class));
              times = 0;
          }};
      }
test_case.class_method_signature: GuestDataUpdateReceiverTest.invalid_messages_are_not_stored()
test_case.full_signature: @Test public void invalid_messages_are_not_stored()
test_case.identifier: invalid_messages_are_not_stored
test_case.invocations: getBody onMessage storeGuestModel withInstanceOf
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void invalid_messages_are_not_stored()
focal_class.declarator: LOGGER = Logger.getLogger(GuestDataUpdateReceiver.class.getName())
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = Logger.getLogger(GuestDataUpdateReceiver.class.getName());
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: GUEST_EVENT_TOPIC = "java:global/jms/topic/guest"
focal_class.modifier: public static final
focal_class.original_string: public static final String GUEST_EVENT_TOPIC = "java:global/jms/topic/guest";
focal_class.type: String
focal_class.var_name: GUEST_EVENT_TOPIC
focal_class.declarator: guestModelRepository
focal_class.modifier: private
focal_class.original_string: private GuestModelRepository guestModelRepository;
focal_class.type: GuestModelRepository
focal_class.var_name: guestModelRepository
focal_class.file: booking/src/main/java/org/koenighotze/jee7hotel/booking/business/GuestDataUpdateReceiver.java
focal_class.identifier: GuestDataUpdateReceiver
focal_class.interfaces: implements MessageListener
focal_class.class_method_signature: GuestDataUpdateReceiver.GuestDataUpdateReceiver()
focal_class.full_signature: public  GuestDataUpdateReceiver()
focal_class.identifier: GuestDataUpdateReceiver
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  GuestDataUpdateReceiver()
focal_class.class_method_signature: GuestDataUpdateReceiver.GuestDataUpdateReceiver(GuestModelRepository guestModelRepository)
focal_class.full_signature: @Inject public  GuestDataUpdateReceiver(GuestModelRepository guestModelRepository)
focal_class.identifier: GuestDataUpdateReceiver
focal_class.modifiers: @Inject public
focal_class.parameters: (GuestModelRepository guestModelRepository)
focal_class.signature:  GuestDataUpdateReceiver(GuestModelRepository guestModelRepository)
focal_class.class_method_signature: GuestDataUpdateReceiver.onMessage(Message message)
focal_class.full_signature: @Override public void onMessage(Message message)
focal_class.identifier: onMessage
focal_class.modifiers: @Override public
focal_class.parameters: (Message message)
focal_class.return: void
focal_class.signature: void onMessage(Message message)
focal_method.body: @Override
      public void onMessage(Message message) {
          LOGGER.info(() -> "Received message " + message);
  
          try {
              GuestModel guest = JAXB.unmarshal(new StringReader(message.getBody(String.class)), GuestModel.class);
              LOGGER.info(() -> "Received " + guest);
  
              guestModelRepository.storeGuestModel(guest);
          } catch (DataBindingException | JMSException e) {
              LOGGER.log(SEVERE, "Cannot handle message " + message, e);
          }
      }
focal_method.class_method_signature: GuestDataUpdateReceiver.onMessage(Message message)
focal_method.full_signature: @Override public void onMessage(Message message)
focal_method.identifier: onMessage
focal_method.invocations: info unmarshal getBody info storeGuestModel log
focal_method.modifiers: @Override public
focal_method.parameters: (Message message)
focal_method.return: void
focal_method.signature: void onMessage(Message message)