PackageBuilderFactory { public static PackageBuilder create(PackagingType packagingType, PackagingOptions options) { if (packagingType.equals(MULE_DOMAIN_BUNDLE)) { return new DomainBundlePackageBuilder(); } return new MulePackageBuilder().withPackagingOptions(options); }  static PackageBuilder create(PackagingType packagingType, PackagingOptions options);  }
@Test public void createDomainBundlePackageBuilderTest() { PackageBuilder actualPackageBuilder = PackageBuilderFactory.create(PackagingType.MULE_DOMAIN_BUNDLE, mock(PackagingOptions.class)); assertThat("Package builder type is not the expected", actualPackageBuilder, instanceOf(DomainBundlePackageBuilder.class)); }
@Test public void createMulePackageBuilderMuleApplicationPackagingTypeTest() { PackageBuilder actualPackageBuilder = PackageBuilderFactory.create(PackagingType.MULE_APPLICATION, mock(PackagingOptions.class)); assertThat("Package builder type is not the expected", actualPackageBuilder, instanceOf(MulePackageBuilder.class)); }
@Test public void createMulePackageBuilderMuleDomainPackagingTypeTest() { PackageBuilder actualPackageBuilder = PackageBuilderFactory.create(PackagingType.MULE_DOMAIN, mock(PackagingOptions.class)); assertThat("Package builder type is not the expected", actualPackageBuilder, instanceOf(MulePackageBuilder.class)); }
@Test public void createMulePackageBuilderMulePolicyPackagingTypeTest() { PackageBuilder actualPackageBuilder = PackageBuilderFactory.create(PackagingType.MULE_POLICY, mock(PackagingOptions.class)); assertThat("Package builder type is not the expected", actualPackageBuilder, instanceOf(MulePackageBuilder.class)); }