ContentObservables { @NonNull public static Observable broadcastObservable(@NonNull final Context context, @NonNull final String... actions) { return new BroadcastObservable(context, actions); } private  ContentObservables(); @NonNull static Observable broadcastObservable(@NonNull final Context context,
      @NonNull final String... actions); @NonNull static Observable sharedPreferencesObservable(@NonNull final SharedPreferences preferences,
      @NonNull final String... keys);  }
@Test public void shouldBeAbleToObserveBroadcasts() { updatable.addToObservable(broadcastObservable(getApplication(), TEST_ACTION)); }
@Test public void shouldUpdateForBroadcast() { updatable.addToObservable(broadcastObservable(getApplication(), TEST_ACTION)); sendBroadcast(new Intent(TEST_ACTION)); assertThat(updatable, wasUpdated()); }
@Test public void shouldUpdateForSecondaryBroadcast() { updatable.addToObservable(broadcastObservable(getApplication(), PRIMARY_ACTION, TEST_ACTION)); sendBroadcast(new Intent(TEST_ACTION)); assertThat(updatable, wasUpdated()); }
@Test public void shouldNotGetUpdateFromBroadcastForEmptyFilter() { updatable.addToObservable(broadcastObservable(getApplication())); sendBroadcast(new Intent(TEST_ACTION)); assertThat(updatable, UpdatableUpdated.wasNotUpdated()); }