@Test public void setBuilderWithDefaultExportedPackagesValueTest() throws IOException { MuleArtifactContentResolver resolverMock = mock(MuleArtifactContentResolver.class); List<String> exportedPackages = new ArrayList<>(); exportedPackages.add(JAR_1); exportedPackages.add(JAR_2); exportedPackages.add(JAR_3); when(resolverMock.getExportedPackages()).thenReturn(exportedPackages); generator.setBuilderWithDefaultExportedPackagesValue(defaultBuilder, muleArtifact, resolverMock); assertThat("Exported packages are not the expected", defaultBuilder.build().getClassLoaderModelLoaderDescriptor().getAttributes().get("exportedPackages"), nullValue()); }
@Override protected void setBuilderWithDefaultExportedPackagesValue(MuleApplicationModel.MuleApplicationModelBuilder builder, MuleApplicationModel originalMuleArtifact, MuleArtifactContentResolver muleArtifactContentResolver) throws IOException { builder.withClassLoaderModelDescriptorLoader(originalMuleArtifact.getClassLoaderModelLoaderDescriptor() != null ? originalMuleArtifact.getClassLoaderModelLoaderDescriptor() : new MuleArtifactLoaderDescriptor(MULE_ID, new HashMap<>())); }
DefaultValuesPolicyMuleArtifactJsonGenerator extends AbstractDefaultValuesMuleArtifactJsonGenerator { @Override protected void setBuilderWithDefaultExportedPackagesValue(MuleApplicationModel.MuleApplicationModelBuilder builder, MuleApplicationModel originalMuleArtifact, MuleArtifactContentResolver muleArtifactContentResolver) throws IOException { builder.withClassLoaderModelDescriptorLoader(originalMuleArtifact.getClassLoaderModelLoaderDescriptor() != null ? originalMuleArtifact.getClassLoaderModelLoaderDescriptor() : new MuleArtifactLoaderDescriptor(MULE_ID, new HashMap<>())); } }
DefaultValuesPolicyMuleArtifactJsonGenerator extends AbstractDefaultValuesMuleArtifactJsonGenerator { @Override protected void setBuilderWithDefaultExportedPackagesValue(MuleApplicationModel.MuleApplicationModelBuilder builder, MuleApplicationModel originalMuleArtifact, MuleArtifactContentResolver muleArtifactContentResolver) throws IOException { builder.withClassLoaderModelDescriptorLoader(originalMuleArtifact.getClassLoaderModelLoaderDescriptor() != null ? originalMuleArtifact.getClassLoaderModelLoaderDescriptor() : new MuleArtifactLoaderDescriptor(MULE_ID, new HashMap<>())); }  }
DefaultValuesPolicyMuleArtifactJsonGenerator extends AbstractDefaultValuesMuleArtifactJsonGenerator { @Override protected void setBuilderWithDefaultExportedPackagesValue(MuleApplicationModel.MuleApplicationModelBuilder builder, MuleApplicationModel originalMuleArtifact, MuleArtifactContentResolver muleArtifactContentResolver) throws IOException { builder.withClassLoaderModelDescriptorLoader(originalMuleArtifact.getClassLoaderModelLoaderDescriptor() != null ? originalMuleArtifact.getClassLoaderModelLoaderDescriptor() : new MuleArtifactLoaderDescriptor(MULE_ID, new HashMap<>())); }   }
DefaultValuesPolicyMuleArtifactJsonGenerator extends AbstractDefaultValuesMuleArtifactJsonGenerator { @Override protected void setBuilderWithDefaultExportedPackagesValue(MuleApplicationModel.MuleApplicationModelBuilder builder, MuleApplicationModel originalMuleArtifact, MuleArtifactContentResolver muleArtifactContentResolver) throws IOException { builder.withClassLoaderModelDescriptorLoader(originalMuleArtifact.getClassLoaderModelLoaderDescriptor() != null ? originalMuleArtifact.getClassLoaderModelLoaderDescriptor() : new MuleArtifactLoaderDescriptor(MULE_ID, new HashMap<>())); }    }