@Test public void addRootResources() throws NoSuchFieldException, IllegalAccessException { List<File> actualRootResourcesList = builder.rootResources; assertTrue("The list of root resources should be empty", actualRootResourcesList.isEmpty()); File rootResourceMock = mock(File.class); when(rootResourceMock.exists()).thenReturn(true); builder.withRootResource(rootResourceMock); assertEquals("The list of root resources should contain one element", 1, actualRootResourcesList.size()); }
public MulePackageBuilder withRootResource(File resource) { checkArgument(resource != null, "The resource must not be null"); checkArgument(resource.exists(), "The resource must exists"); rootResources.add(resource); return this; }
MulePackageBuilder implements PackageBuilder { public MulePackageBuilder withRootResource(File resource) { checkArgument(resource != null, "The resource must not be null"); checkArgument(resource.exists(), "The resource must exists"); rootResources.add(resource); return this; } }
MulePackageBuilder implements PackageBuilder { public MulePackageBuilder withRootResource(File resource) { checkArgument(resource != null, "The resource must not be null"); checkArgument(resource.exists(), "The resource must exists"); rootResources.add(resource); return this; }  }
MulePackageBuilder implements PackageBuilder { public MulePackageBuilder withRootResource(File resource) { checkArgument(resource != null, "The resource must not be null"); checkArgument(resource.exists(), "The resource must exists"); rootResources.add(resource); return this; }  MulePackageBuilder withClasses(File folder); MulePackageBuilder withTestClasses(File folder); MulePackageBuilder withTestMule(File folder); MulePackageBuilder withMaven(File folder); MulePackageBuilder withMuleSrc(File folder); MulePackageBuilder withMuleArtifact(File folder); MulePackageBuilder withRepository(File folder); MulePackageBuilder withRootResource(File resource); MulePackageBuilder withPackagingOptions(PackagingOptions packagingOptions); MulePackageBuilder withArchiver(MuleArchiver archiver); @Override void createPackage(Path originFolderPath, Path destinationPath); @Override void createPackage(Path destinationPath); }
MulePackageBuilder implements PackageBuilder { public MulePackageBuilder withRootResource(File resource) { checkArgument(resource != null, "The resource must not be null"); checkArgument(resource.exists(), "The resource must exists"); rootResources.add(resource); return this; }  MulePackageBuilder withClasses(File folder); MulePackageBuilder withTestClasses(File folder); MulePackageBuilder withTestMule(File folder); MulePackageBuilder withMaven(File folder); MulePackageBuilder withMuleSrc(File folder); MulePackageBuilder withMuleArtifact(File folder); MulePackageBuilder withRepository(File folder); MulePackageBuilder withRootResource(File resource); MulePackageBuilder withPackagingOptions(PackagingOptions packagingOptions); MulePackageBuilder withArchiver(MuleArchiver archiver); @Override void createPackage(Path originFolderPath, Path destinationPath); @Override void createPackage(Path destinationPath); static final String CLASSLOADER_MODEL_JSON; }