@Test
public void testDownloadPayload() throws IOException {

    String path = "test/payload";
    Map<String, Object> payload = new HashMap<>();
    payload.put("key1", "value1");
    payload.put("key2", 200);
    byte[] payloadBytes = objectMapper.writeValueAsString(payload).getBytes();
    when(externalPayloadStorage.download(path)).thenReturn(new ByteArrayInputStream(payloadBytes));
    Map<String, Object> result = externalPayloadStorageUtils.downloadPayload(path);
    assertNotNull(result);
    assertEquals(payload, result);
}