@Override
    public String fetchArtifactMessage(ArtifactStore artifactStore, Configuration configuration, Map<String, Object> metadata, String agentWorkingDirectory) {
        final Map<String, Object> map = new HashMap<>();
        map.put("store_configuration", artifactStore.getConfigurationAsMap(true));
        map.put("fetch_artifact_configuration", configuration.getConfigurationAsMap(true));
        map.put("artifact_metadata", metadata);
        map.put("agent_working_directory", agentWorkingDirectory);
        return NULLS_GSON.toJson(map);
    }
@Test
    public void fetchArtifactMessage_shouldSerializeToJson() {
        final ArtifactMessageConverterV2 converter = new ArtifactMessageConverterV2();
        final ArtifactStore artifactStore = new ArtifactStore("s3-store", "pluginId", create("Foo", false, "Bar"));
        final Map<String, Object> metadata = Map.of("Version", "10.12.0");
        final FetchPluggableArtifactTask pluggableArtifactTask = new FetchPluggableArtifactTask(null, null, "artifactId", create("Filename", false, "build/libs/foo.jar"));

        final String fetchArtifactMessage = converter.fetchArtifactMessage(artifactStore, pluggableArtifactTask.getConfiguration(), metadata, "/temp");

        final String expectedStr = """
                {
                  "artifact_metadata": {
                    "Version": "10.12.0"
                  },
                  "store_configuration": {
                    "Foo": "Bar"
                  },
                  "fetch_artifact_configuration": {
                      "Filename": "build/libs/foo.jar"
                    },
                  "agent_working_directory": "/temp"
                }""";

        assertThatJson(expectedStr).isEqualTo(fetchArtifactMessage);
    }