### Question:
PersistenceOperations { @Nonnull public Single<File> defineNewRecoveredSecretFile(@Nonnull final File directory) { return Single.just(new File(directory, "recovered-secret")); } PersistenceOperations(
      @Nonnull final ShareSerialiser shareSerialiser,
      @Nonnull final RecoverySchemeSerialiser recoverySchemeSerialiser,
      @Nonnull final RxFiles rxFiles); @Nonnull Single<Share> loadShareFromFile(@Nonnull final File file); @Nonnull Single<Boolean> fileContainsShare(@Nonnull final File file); @Nonnull Single<RecoveryScheme> loadRecoverySchemeFromFile(@Nonnull final File file); @Nonnull Single<Boolean> fileContainsRecoveryScheme(@Nonnull final File file); @Nonnull Single<File> defineNewRecoveredSecretFile(@Nonnull final File directory); @Nonnull Single<Boolean> directoryContainsRecoveredSecretFile(@Nonnull final File directory);  }### Answer:
@Test public void testDefineNewRecoveredShareFile_nullDirectory() { persistenceOperations.defineNewRecoveredSecretFile(null); }
@Test public void testDefineNewRecoveredShareFile_nonNullDirectory() { final File directory = new File("test"); persistenceOperations .defineNewRecoveredSecretFile(directory) .test() .awaitDone(200, MILLISECONDS) .assertNoErrors() .assertValue( file -> file.getParentFile().equals(directory) && file.getName().equals("recovered-secret")); }