@Test
public void testDataDir() throws FileNotFoundException, IOException {

    File wrongDir = new File("wrongfolderfortests");
    final File testDir = TestData.file(this, ".").getCanonicalFile();
    System.setProperty("GRIB_CACHE_DIR", testDir.getAbsolutePath());
    boolean isValid = GribUtilities.isValid(testDir);
    assertTrue(isValid);
    isValid = GribUtilities.isValid(wrongDir);
    assertFalse(isValid);
    wrongDir = TestData.file(this, "sampleGrib.grb2").getCanonicalFile();
    isValid = GribUtilities.isValid(wrongDir);
    assertFalse(isValid);
}