public static byte[] zip(List<ZipItem> source) {
        byte[] result = null;
        try (ByteArrayOutputStream byteOut = new ByteArrayOutputStream(); ZipOutputStream zipOut = new ZipOutputStream(
                byteOut)) {
            for (ZipItem item : source) {
                zipOut.putNextEntry(new ZipEntry(item.getItemName()));
                zipOut.write(item.getItemData().getBytes(StandardCharsets.UTF_8));
            }
            zipOut.flush();
            zipOut.finish();
            result = byteOut.toByteArray();
        } catch (IOException e) {
            LOGGER.error("an error occurred while compressing data.", e);
        }
        return result;
    }
@Test
    void testZip() {
        List<ZipUtils.ZipItem> zipItemList = new ArrayList<>();
        zipItemList.add(new ZipUtils.ZipItem("test", "content"));
        byte[] zip = ZipUtils.zip(zipItemList);
        assertTrue(zip != null && zip.length > 0);
    }