@Test public void setBuilderWithDefaultBundleDescriptorLoaderWrongIdValueTest() { MuleApplicationModel muleArtifactSpy = spy(muleArtifact); HashMap<String, Object> attributes = new HashMap<>(); attributes.put(ATTRIBUTE_1, Collections.emptyList()); attributes.put(ATTRIBUTE_2, Collections.emptyList()); doReturn(new MuleArtifactLoaderDescriptor(FAKE_ID, attributes)).when(muleArtifactSpy).getBundleDescriptorLoader(); MuleArtifactContentResolver resolverMock = mock(MuleArtifactContentResolver.class); builder = new MuleApplicationModel.MuleApplicationModelBuilder(); generator.setBuilderWithDefaultBundleDescriptorLoaderValue(builder, muleArtifactSpy, resolverMock); assertThat("Bundle descriptor loader id defined in builder is not the expected", builder.getBundleDescriptorLoader().getId(), equalTo(MULE)); assertThat("Bundle descriptor loader attributes defined in builder is not the expected", builder.getBundleDescriptorLoader().getAttributes(), equalTo(attributes)); }
@Override protected void setBuilderWithDefaultBundleDescriptorLoaderValue(MuleApplicationModel.MuleApplicationModelBuilder builder, MuleApplicationModel originalMuleArtifact, MuleArtifactContentResolver muleArtifactContentResolver) { MuleArtifactLoaderDescriptor bundleDescriptorLoader = originalMuleArtifact.getBundleDescriptorLoader(); builder.withBundleDescriptorLoader(new MuleArtifactLoaderDescriptor(MULE_ID, bundleDescriptorLoader == null || bundleDescriptorLoader.getAttributes() == null ? new HashMap() : bundleDescriptorLoader.getAttributes())); }
DefaultValuesMuleArtifactJsonGenerator extends AbstractDefaultValuesMuleArtifactJsonGenerator { @Override protected void setBuilderWithDefaultBundleDescriptorLoaderValue(MuleApplicationModel.MuleApplicationModelBuilder builder, MuleApplicationModel originalMuleArtifact, MuleArtifactContentResolver muleArtifactContentResolver) { MuleArtifactLoaderDescriptor bundleDescriptorLoader = originalMuleArtifact.getBundleDescriptorLoader(); builder.withBundleDescriptorLoader(new MuleArtifactLoaderDescriptor(MULE_ID, bundleDescriptorLoader == null || bundleDescriptorLoader.getAttributes() == null ? new HashMap() : bundleDescriptorLoader.getAttributes())); } }
DefaultValuesMuleArtifactJsonGenerator extends AbstractDefaultValuesMuleArtifactJsonGenerator { @Override protected void setBuilderWithDefaultBundleDescriptorLoaderValue(MuleApplicationModel.MuleApplicationModelBuilder builder, MuleApplicationModel originalMuleArtifact, MuleArtifactContentResolver muleArtifactContentResolver) { MuleArtifactLoaderDescriptor bundleDescriptorLoader = originalMuleArtifact.getBundleDescriptorLoader(); builder.withBundleDescriptorLoader(new MuleArtifactLoaderDescriptor(MULE_ID, bundleDescriptorLoader == null || bundleDescriptorLoader.getAttributes() == null ? new HashMap() : bundleDescriptorLoader.getAttributes())); }  }
DefaultValuesMuleArtifactJsonGenerator extends AbstractDefaultValuesMuleArtifactJsonGenerator { @Override protected void setBuilderWithDefaultBundleDescriptorLoaderValue(MuleApplicationModel.MuleApplicationModelBuilder builder, MuleApplicationModel originalMuleArtifact, MuleArtifactContentResolver muleArtifactContentResolver) { MuleArtifactLoaderDescriptor bundleDescriptorLoader = originalMuleArtifact.getBundleDescriptorLoader(); builder.withBundleDescriptorLoader(new MuleArtifactLoaderDescriptor(MULE_ID, bundleDescriptorLoader == null || bundleDescriptorLoader.getAttributes() == null ? new HashMap() : bundleDescriptorLoader.getAttributes())); }   }
DefaultValuesMuleArtifactJsonGenerator extends AbstractDefaultValuesMuleArtifactJsonGenerator { @Override protected void setBuilderWithDefaultBundleDescriptorLoaderValue(MuleApplicationModel.MuleApplicationModelBuilder builder, MuleApplicationModel originalMuleArtifact, MuleArtifactContentResolver muleArtifactContentResolver) { MuleArtifactLoaderDescriptor bundleDescriptorLoader = originalMuleArtifact.getBundleDescriptorLoader(); builder.withBundleDescriptorLoader(new MuleArtifactLoaderDescriptor(MULE_ID, bundleDescriptorLoader == null || bundleDescriptorLoader.getAttributes() == null ? new HashMap() : bundleDescriptorLoader.getAttributes())); }   static final String EXPORTED_PACKAGES; static final String EXPORTED_RESOURCES; static final String DEFAULT_PACKAGE_EXPORT; static final String COMPILED_JAVA_EXTENSION; static final String PACKAGE_SEPARATOR; }