@Test
    public void testCreateNamespace() throws Exception {
        final String namespaceName = "testCreateNamespace";
        final String namespaceInfo = DEFAULT_TENANT + InlongConstants.SLASH + namespaceName;
        String param = GSON.toJson(policies);
        param = param.replaceAll("messageTtlInSeconds", "message_ttl_in_seconds")
                .replaceAll("retentionPolicies", "retention_policies");
        final HttpHeaders headers = new HttpHeaders();
        if (StringUtils.isNotEmpty(pulsarClusterInfo.getToken())) {
            headers.add("Authorization", "Bearer " + pulsarClusterInfo.getToken());
        }
        final MediaType type = MediaType.parseMediaType("application/json; charset=UTF-8");
        headers.setContentType(type);
        headers.add("Accept", MediaType.APPLICATION_JSON.toString());

        PulsarUtils.createNamespace(client, pulsarCluster, DEFAULT_TENANT, namespaceName, policies);
        Thread.sleep(500);
        List<String> namespaces = PulsarUtils.getNamespaces(client, pulsarCluster, DEFAULT_TENANT);
        assertTrue(namespaces.contains(namespaceInfo));
    }
Test cases for {@link PulsarUtils#createNamespace(RestTemplate, PulsarClusterInfo, String, String, PulsarNamespacePolicies)}.

@throws Exception
inlong-manager/manager-service/src/test/java/org/apache/inlong/manager/service/queue/PulsarUtilsTest.java