### Question:
NotificationInteractor extends ValueInteractor<Notification> { public Observable<Notification> filter(@NonNull @Notification.Type final String type) { return notificationSubject.filter( notification -> isValidTypeMatch(notification, type)) .doOnNext(notification -> notification.setSeen(true)); } NotificationInteractor(@NonNull final Context context); void clear(); void onNext(@NonNull final Notification notification); Observable<Notification> filter(@NonNull @Notification.Type final String type);  }### Answer:
@Test public void filter() throws Exception { final Notification incoming = new Notification(Notification.UNKNOWN, null); final Notification result = Sync.wrapAfter(() -> notificationInteractor.onNext(incoming), notificationInteractor.filter(incoming.getType())) .last(); assertThat(result, equalTo(incoming)); assertThat(result.hasSeen(), equalTo(true)); }