PermanentApplicationPackage { public Optional<ApplicationPackage> applicationPackage() { return applicationPackage; } PermanentApplicationPackage(ConfigserverConfig config); Optional<ApplicationPackage> applicationPackage();  }
@Test public void testNonexistingApplication() { PermanentApplicationPackage permanentApplicationPackage = new PermanentApplicationPackage( new ConfigserverConfig(new ConfigserverConfig.Builder().applicationDirectory("_no_such_dir"))); assertFalse(permanentApplicationPackage.applicationPackage().isPresent()); }
@Test public void testExistingApplication() throws IOException { File tmpDir = folder.newFolder(); PermanentApplicationPackage permanentApplicationPackage = new PermanentApplicationPackage( new ConfigserverConfig(new ConfigserverConfig.Builder().applicationDirectory(tmpDir.getAbsolutePath()))); assertTrue(permanentApplicationPackage.applicationPackage().isPresent()); }