AppConfig implements TargetConfig<CameraX>, Config { @RestrictTo(Scope.LIBRARY_GROUP) public CameraFactory getCameraFactory(@Nullable CameraFactory valueIfMissing) { return mConfig.retrieveOption(OPTION_CAMERA_FACTORY, valueIfMissing); } AppConfig(OptionsBundle options); @RestrictTo(Scope.LIBRARY_GROUP) CameraFactory getCameraFactory(@Nullable CameraFactory valueIfMissing); @RestrictTo(Scope.LIBRARY_GROUP) CameraDeviceSurfaceManager getDeviceSurfaceManager(
            @Nullable CameraDeviceSurfaceManager valueIfMissing); @RestrictTo(Scope.LIBRARY_GROUP) UseCaseConfigFactory getUseCaseConfigRepository(
            @Nullable UseCaseConfigFactory valueIfMissing); @RestrictTo(Scope.LIBRARY_GROUP) @Override boolean containsOption(Option<?> id); @RestrictTo(Scope.LIBRARY_GROUP) @Override @Nullable ValueT retrieveOption(Option<ValueT> id); @RestrictTo(Scope.LIBRARY_GROUP) @Override @Nullable ValueT retrieveOption(Option<ValueT> id, @Nullable ValueT valueIfMissing); @RestrictTo(Scope.LIBRARY_GROUP) @Override void findOptions(String idStem, OptionMatcher matcher); @RestrictTo(Scope.LIBRARY_GROUP) @Override Set<Option<?>> listOptions(); @RestrictTo(Scope.LIBRARY_GROUP) @Override @Nullable Class<CameraX> getTargetClass(
            @Nullable Class<CameraX> valueIfMissing); @RestrictTo(Scope.LIBRARY_GROUP) @Override Class<CameraX> getTargetClass(); @RestrictTo(Scope.LIBRARY_GROUP) @Override @Nullable String getTargetName(@Nullable String valueIfMissing); @RestrictTo(Scope.LIBRARY_GROUP) @Override String getTargetName();  }
@Test public void canGetCameraFactory() { CameraFactory cameraFactory = mAppConfig.getCameraFactory( null); assertThat(cameraFactory).isInstanceOf(FakeCameraFactory.class); }