DomainBundlePackageBuilder implements PackageBuilder { public DomainBundlePackageBuilder withMaven(File folder) { checkArgument(folder != null, "The folder must not be null"); checkArgument(folder.exists(), "The folder must exist"); mavenFolder = folder; return this; }  DomainBundlePackageBuilder withMaven(File folder); DomainBundlePackageBuilder withDomain(File folder); DomainBundlePackageBuilder withApplications(File folder); DomainBundlePackageBuilder withArchiver(AbstractArchiver archiver); @Override void createPackage(Path originFolderPath, Path destinationPath); @Override void createPackage(Path destinationPath);  }
@Test public void setNullMavenFolder() { expectedException.expect(IllegalArgumentException.class); expectedException.expectMessage("The folder must not be null"); builder.withMaven(null); }
@Test public void setNonExistentMavenFolder() { expectedException.expect(IllegalArgumentException.class); expectedException.expectMessage("The folder must exist"); builder.withMaven(new File("fake")); }