### Question:
ExposedThingEvent extends ThingEvent<T> { public Observable<Optional<T>> observer() { return state.getSubject(); } ExposedThingEvent(String name, ThingEvent<T> event);   ExposedThingEvent(String name, EventState<T> state); EventState<T> getState(); void emit(); void emit(T data); Observable<Optional<T>> observer(); @Override int hashCode(); @Override boolean equals(Object o); @Override String toString();  }### Answer:
@Test public void subscribeShouldSubscribeToEventState() { when(state.getSubject()).thenReturn(subject); ExposedThingEvent event = new ExposedThingEvent<>(name, state); event.observer().subscribe(observer); verify(subject).subscribe(observer); }