### Question:
PersistenceOperations { @Nonnull public Single<File> defineNewRecoverySchemeFile(@Nonnull final File directory) { checkNotNull(directory, "\'directory\' must not be null."); return Single.just(new File(directory, "recovery-scheme")); } PersistenceOperations(
      @Nonnull final ShareSerialiser shareSerialiser,
      @Nonnull final RecoverySchemeSerialiser recoverySchemeSerialiser,
      @Nonnull final RxFiles rxFiles); @Nonnull Completable saveShareToFile(@Nonnull final Share share, @Nonnull final File file); @Nonnull Completable saveRecoverySchemeToFile(@Nonnull final RecoveryScheme recoveryScheme, @Nonnull final File file); @Nonnull Single<File> defineNewShareFile(@Nonnull final Share share, @Nonnull final File directory); @Nonnull Single<File> defineNewRecoverySchemeFile(@Nonnull final File directory); @Nonnull Single<Boolean> directoryContainsShareFiles(@Nonnull final File directory); @Nonnull Single<Boolean> directoryContainsRecoverySchemeFiles(@Nonnull final File directory);  }### Answer:
@Test(expected = IllegalArgumentException.class) public void testDefineNewRecoverySchemeFile_nullDirectory() { persistenceOperations.defineNewRecoverySchemeFile(null); }
@Test public void testDefineNewRecoveryScheme_nonNullDirectory() { final File directory = new File("test"); persistenceOperations .defineNewRecoverySchemeFile(directory) .test() .awaitDone(200, MILLISECONDS) .assertNoErrors() .assertValue(file -> file.getParentFile().equals(directory) && file.getName().equals("recovery-scheme")); }