### Question:
ScopedEventBus implements EventBus, Serializable { @Override public <T> void publish(Object sender, T payload) { publish("", sender, payload); } ScopedEventBus(EventScope scope);  ScopedEventBus(EventScope scope, EventBus parentEventBus); @Override EventScope getScope(); @Override void publish(Object sender, T payload); @Override void publish(String topic, Object sender, T payload); @Override void publish(EventScope scope, Object sender, T payload); @Override void publish(EventScope scope, String topic, Object sender, T payload); @Override void subscribe(EventBusListener<T> listener); @Override void subscribeWithWeakReference(EventBusListener<T> listener); @Override void subscribe(EventBusListener<T> listener, String topic); @Override void subscribe(EventBusListener<T> listener, boolean includingPropagatingEvents); @Override void subscribeWithWeakReference(EventBusListener<T> listener, String topic); @Override void subscribeWithWeakReference(EventBusListener<T> listener, boolean includingPropagatingEvents); @Override void subscribe(Object listener); @Override void subscribe(Object listener, String topic); @Override void subscribeWithWeakReference(Object listener, String topic); @Override void subscribeWithWeakReference(Object listener); @Override void subscribe(Object listener, boolean includingPropagatingEvents); @Override void subscribeWithWeakReference(Object listener, boolean includingPropagatingEvents); @Override void unsubscribe(EventBusListener<T> listener); @Override void unsubscribe(final Object listener); @Override String toString();  }### Answer:
@Test public void testPublishToInvalidScope() { assertThrows(UnsupportedOperationException.class, () -> applicationEventBus.publish(EventScope.SESSION, this, "fail")); }