KeyedAppStatesReporter { public static @NonNull KeyedAppStatesReporter createWithExecutor( @NonNull Context context, @NonNull Executor executor) { return new DefaultKeyedAppStatesReporter(context, executor); } KeyedAppStatesReporter(); static @NonNull KeyedAppStatesReporter create(@NonNull Context context); static @NonNull KeyedAppStatesReporter createWithExecutor(
            @NonNull Context context, @NonNull Executor executor); abstract void setStates(@NonNull Collection<KeyedAppState> states); abstract void setStatesImmediate(@NonNull Collection<KeyedAppState> states);  }
@Test @SmallTest public void createWithExecutor_nullContext_throwsNullPointerException() { TestExecutor testExecutor = new TestExecutor(); try { KeyedAppStatesReporter.createWithExecutor(null, testExecutor); fail(); } catch (NullPointerException expected) { } }
@Test @SmallTest public void createWithExecutor_nullExecutor_throwsNullPointerException() { try { KeyedAppStatesReporter.createWithExecutor(mContext, null); fail(); } catch (NullPointerException expected) { } }
@Test @SmallTest public void createWithExecutor_createsDefaultKeyedAppStatesReporter() { TestExecutor testExecutor = new TestExecutor(); KeyedAppStatesReporter reporter = KeyedAppStatesReporter.createWithExecutor(mContext, testExecutor); assertThat(reporter).isInstanceOf(DefaultKeyedAppStatesReporter.class); }