@Override
    public Map<String, Object> getAttributes(boolean addSecureFields) {
        Map<String, Object> materialMap = new HashMap<>();
        materialMap.put("type", "package");
        materialMap.put("plugin-id", getPluginId());
        Map<String, String> repositoryConfigurationMap = packageDefinition.getRepository().getConfiguration().getConfigurationAsMap(addSecureFields);
        materialMap.put("repository-configuration", repositoryConfigurationMap);
        Map<String, String> packageConfigurationMap = packageDefinition.getConfiguration().getConfigurationAsMap(addSecureFields);
        materialMap.put("package-configuration", packageConfigurationMap);
        return materialMap;
    }
@Test
    void shouldGetAttributesWithSecureFields() {
        PackageMaterial material = createPackageMaterialWithSecureConfiguration();
        Map<String, Object> attributes = material.getAttributes(true);

        assertThat(attributes.get("type")).isEqualTo("package");
        assertThat(attributes.get("plugin-id")).isEqualTo("pluginid");
        Map<String, Object> repositoryConfiguration = (Map<String, Object>) attributes.get("repository-configuration");
        assertThat(repositoryConfiguration.get("k1")).isEqualTo("repo-v1");
        assertThat(repositoryConfiguration.get("k2")).isEqualTo("repo-v2");
        Map<String, Object> packageConfiguration = (Map<String, Object>) attributes.get("package-configuration");
        assertThat(packageConfiguration.get("k3")).isEqualTo("package-v1");
        assertThat(packageConfiguration.get("k4")).isEqualTo("package-v2");
    }