### Question:
EasyScreenshots { public static ScreenshotPolicy getPolicy() { return getInstance().policy; } private  EasyScreenshots();   EasyScreenshots(EasyScreenshotsConfig config, ScreenshotFileProvider screenshotFileProvider); static ScreenshotFileProvider getScreenshotFileProvider(); static EasyScreenshots setScreenshotFileProvider(ScreenshotFileProvider screenshotFileProvider); static File takeScreenshot(String tag); static File takeScreenshotForcefully(String tag); static EasyScreenshots setLoggingEnabled(boolean enabled); static EasyScreenshots setScreenshotLibrary(@NonNull ScreenshotLibrary screenshotLibrary); static EasyScreenshots setPolicy(@NonNull ScreenshotPolicy policy); static EasyScreenshots setFileProvider(@NonNull ScreenshotFileProvider screenshotFileProvider); static ScreenshotLibrary getScreenshotLibrary(); static ScreenshotPolicy getPolicy(); static File getScreenshotFile(String tag); static void log(String message); static void log(String tag, String message); static void log(String message, Throwable ex); static void log(String tag, String message, Throwable ex);  }### Answer:
@Test public void testInitializer_Defaults() throws Exception { new EasyScreenshots.Initializer() .init(); assertThat(EasyScreenshots.getPolicy()).isEqualTo(ScreenshotPolicy.ALL); }
@Test public void testInitializer_Override() throws Exception { new EasyScreenshots.Initializer() .policy(ScreenshotPolicy.FAILURES) .init(); assertThat(EasyScreenshots.getPolicy()).isEqualTo(ScreenshotPolicy.FAILURES); }
@Test public void testInitializer_InstrumentationArgs() throws Exception { Bundle bundle = mock(Bundle.class); when(bundle.containsKey("screenshot-policy")).thenReturn(true); when(bundle.getString("screenshot-policy")).thenReturn("FAILURES"); when(InstrumentationRegistry.getArguments()).thenReturn(bundle); new EasyScreenshots.Initializer() .policy(ScreenshotPolicy.NONE) .init(); assertThat(EasyScreenshots.getPolicy()).isEqualTo(ScreenshotPolicy.FAILURES); }