@Test public void setBuilderWithDefaultExportedResourcesValueTest() throws IOException { MuleArtifactContentResolver resolverMock = mock(MuleArtifactContentResolver.class); List<String> exportedResources = new ArrayList<>(); exportedResources.add(JAR_1); exportedResources.add(JAR_2); exportedResources.add(JAR_3); when(resolverMock.getExportedResources()).thenReturn(exportedResources); generator.setBuilderWithDefaultExportedResourcesValue(defaultBuilder, muleArtifact, resolverMock); assertThat("Exported resources are not the expected", defaultBuilder.build().getClassLoaderModelLoaderDescriptor().getAttributes().get("exportedResources"), nullValue()); }
@Override protected void setBuilderWithDefaultExportedResourcesValue(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 setBuilderWithDefaultExportedResourcesValue(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 setBuilderWithDefaultExportedResourcesValue(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 setBuilderWithDefaultExportedResourcesValue(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 setBuilderWithDefaultExportedResourcesValue(MuleApplicationModel.MuleApplicationModelBuilder builder, MuleApplicationModel originalMuleArtifact, MuleArtifactContentResolver muleArtifactContentResolver) throws IOException { builder.withClassLoaderModelDescriptorLoader(originalMuleArtifact.getClassLoaderModelLoaderDescriptor() != null ? originalMuleArtifact.getClassLoaderModelLoaderDescriptor() : new MuleArtifactLoaderDescriptor(MULE_ID, new HashMap<>())); }    }