@Override
    public boolean includes(TopicName topicName) {
        if (!this.nsname.equals(topicName.getNamespaceObject())) {
            return false;
        }
        return this.keyRange.contains(factory.getLongHashCode(topicName.toString()));
    }
@Test
    public void testIncludes() {
        TopicName topicName = TopicName.get("persistent://pulsar/use/ns1/topic-1");
        Long hashKey = factory.getLongHashCode(topicName.toString());
        Long upper = Math.max(hashKey + 1, NamespaceBundles.FULL_UPPER_BOUND);
        BoundType upperType = upper.equals(NamespaceBundles.FULL_UPPER_BOUND) ? BoundType.CLOSED : BoundType.OPEN;
        NamespaceBundle bundle = factory.getBundle(topicName.getNamespaceObject(),
                Range.range(hashKey / 2, BoundType.CLOSED, upper, upperType));
        assertTrue(bundle.includes(topicName));
        bundle = factory.getBundle(NamespaceName.get("pulsar/use/ns1"),
                Range.range(upper, BoundType.CLOSED, NamespaceBundles.FULL_UPPER_BOUND, BoundType.CLOSED));
        assertFalse(bundle.includes(topicName));

        NamespaceBundle otherBundle = factory.getBundle(NamespaceName.get("pulsar/use/ns2"),
                Range.range(0l, BoundType.CLOSED, 0x40000000L, BoundType.OPEN));
        assertFalse(otherBundle.includes(topicName));
    }