@Test public void testGetMessages_Empty() { MessageList messageList = new MessageList(); assertThat(setupPmoDispatcher(XYZ).getMessages(messageList), emptyMessageList()); assertThat(setupPmoDispatcher("invalidProperty").getMessages(messageList), emptyMessageList()); }
@Override public MessageList getMessages(MessageList messageList) { Object boundObject = getBoundObject(); if (boundObject == null) { return new MessageList(); } else { MessageList msgListForBoundObject = messageList.getMessagesFor(boundObject, getProperty()); msgListForBoundObject.add(fallbackDispatcher.getMessages(messageList)); return msgListForBoundObject; } }
ReflectionPropertyDispatcher implements PropertyDispatcher { @Override public MessageList getMessages(MessageList messageList) { Object boundObject = getBoundObject(); if (boundObject == null) { return new MessageList(); } else { MessageList msgListForBoundObject = messageList.getMessagesFor(boundObject, getProperty()); msgListForBoundObject.add(fallbackDispatcher.getMessages(messageList)); return msgListForBoundObject; } } }
ReflectionPropertyDispatcher implements PropertyDispatcher { @Override public MessageList getMessages(MessageList messageList) { Object boundObject = getBoundObject(); if (boundObject == null) { return new MessageList(); } else { MessageList msgListForBoundObject = messageList.getMessagesFor(boundObject, getProperty()); msgListForBoundObject.add(fallbackDispatcher.getMessages(messageList)); return msgListForBoundObject; } } ReflectionPropertyDispatcher(Supplier<?> boundObjectSupplier, String property,
            PropertyDispatcher fallbackDispatcher); }
ReflectionPropertyDispatcher implements PropertyDispatcher { @Override public MessageList getMessages(MessageList messageList) { Object boundObject = getBoundObject(); if (boundObject == null) { return new MessageList(); } else { MessageList msgListForBoundObject = messageList.getMessagesFor(boundObject, getProperty()); msgListForBoundObject.add(fallbackDispatcher.getMessages(messageList)); return msgListForBoundObject; } } ReflectionPropertyDispatcher(Supplier<?> boundObjectSupplier, String property,
            PropertyDispatcher fallbackDispatcher); @Override String getProperty(); @CheckForNull @Override Object getBoundObject(); @Override Class<?> getValueClass(); @Override @SuppressWarnings("unchecked") V pull(Aspect<V> aspect); @Override void push(Aspect<V> aspect); @Override boolean isPushable(Aspect<V> aspect); @Override MessageList getMessages(MessageList messageList); @Override String toString(); }
ReflectionPropertyDispatcher implements PropertyDispatcher { @Override public MessageList getMessages(MessageList messageList) { Object boundObject = getBoundObject(); if (boundObject == null) { return new MessageList(); } else { MessageList msgListForBoundObject = messageList.getMessagesFor(boundObject, getProperty()); msgListForBoundObject.add(fallbackDispatcher.getMessages(messageList)); return msgListForBoundObject; } } ReflectionPropertyDispatcher(Supplier<?> boundObjectSupplier, String property,
            PropertyDispatcher fallbackDispatcher); @Override String getProperty(); @CheckForNull @Override Object getBoundObject(); @Override Class<?> getValueClass(); @Override @SuppressWarnings("unchecked") V pull(Aspect<V> aspect); @Override void push(Aspect<V> aspect); @Override boolean isPushable(Aspect<V> aspect); @Override MessageList getMessages(MessageList messageList); @Override String toString();  }