@Test
  public void nullParametersOK() {
    SourceRepository repository;
    repository = FileSystemSourceRepository.getInstance(null);

    notNullAndCorrectType(repository);
  }
  @Test
  public void checkCorrectClass() {
    ParameterList parameters = getParameters();

    SourceRepository repository;
    repository = FileSystemSourceRepository.getInstance(parameters);

    assertTrue(repository instanceof FileSystemSourceRepositoryImpl);
  }
  @Test
  public void emptyParametersOK() {

    ParameterList parameters = new ParameterList();

    SourceRepository repository;
    repository = FileSystemSourceRepository.getInstance(parameters);

    notNullAndCorrectType(repository);
  }
  @Test
  public void checkNormalTxtLookupOrder() throws IOException {

    ParameterList parameters = getParameters();
    SourceRepository repository;
    repository = FileSystemSourceRepository.getInstance(parameters);

    for (int i = 0; i <= SourceDirectory.getLimit(); i++) {

      String name = Integer.toBinaryString(i) + ".pan";

      SourceFile source = repository.retrieveTxtSource(name);
      SourceDirectory sd = SourceDirectory.valueFromMask(i);

      if (!source.isAbsent()) {
        File location = source.getLocation();
        assertEquals(location, sd.asDirectory(tmpdir));
      } else {
        assertNull(sd);
      }
    }
  }