protected void validatePersistentTopicName(String property, String namespace, String encodedTopic) {
        validateTopicName(property, namespace, encodedTopic);
        if (topicName.getDomain() != TopicDomain.persistent) {
            throw new RestException(Status.NOT_ACCEPTABLE, "Need to provide a persistent topic name");
        }
    }
@Test
    public void testValidatePersistentTopicNameInvalid() {
        String tenant = "test-tenant";
        String namespace = "test-namespace";
        String topic = Codec.encode("test-topic");

        AdminResource nPResource = mockNonPersistentResource();
        try {
            nPResource.validatePersistentTopicName(tenant, namespace, topic);
            fail("Should fail validation on non-persistent topic");
        } catch (RestException e) {
            assertEquals(Status.NOT_ACCEPTABLE.getStatusCode(), e.getResponse().getStatus());
        }
    }