public static Tuple2<String, String> getNameAndNamespaceFromString(String nameDotNamespace) {
        if (!nameDotNamespace.contains(".")) {
            return new Tuple2<>(nameDotNamespace, "");
        }
        String name = nameDotNamespace.substring(nameDotNamespace.lastIndexOf(".") + 1);
        String namespace = nameDotNamespace.substring(0, nameDotNamespace.lastIndexOf("."));
        return new Tuple2<>(name, namespace);
    }
@Test
    public void testNamespaceDotNames() {
        String namespaceDotName = "foo.bar";
        Tuple2<String, String> tuple = ConfigUtils.getNameAndNamespaceFromString(namespaceDotName);
        assertEquals("bar", tuple.first);
        assertEquals("foo", tuple.second);

        namespaceDotName = "foo.baz.bar";
        tuple = ConfigUtils.getNameAndNamespaceFromString(namespaceDotName);
        assertEquals("bar", tuple.first);
        assertEquals("foo.baz", tuple.second);

        // no namespace
        namespaceDotName = "bar";
        tuple = ConfigUtils.getNameAndNamespaceFromString(namespaceDotName);
        assertEquals("bar", tuple.first);
        assertEquals("", tuple.second);

        // no name
        namespaceDotName = "foo.";
        tuple = ConfigUtils.getNameAndNamespaceFromString(namespaceDotName);
        assertEquals("", tuple.first);
        assertEquals("foo", tuple.second);

        // no namespace
        namespaceDotName = ".bar";
        tuple = ConfigUtils.getNameAndNamespaceFromString(namespaceDotName);
        assertEquals("bar", tuple.first);
        assertEquals("", tuple.second);
    }