source: class JMSConnectionFactoryProviderTest {
  
      private static Logger logger;
  
      @Test(expected = AssertionError.class)
      public void validateFailsIfURINotHostPortAndNotActiveMQ() throws Exception {
  
target:         TestRunner runner = TestRunners.newTestRunner(mock(Processor.class));
          JMSConnectionFactoryProvider cfProvider = new JMSConnectionFactoryProvider();
          runner.addControllerService("cfProvider", cfProvider);
          runner.setProperty(cfProvider, JMSConnectionFactoryProvider.BROKER_URI, "myhost");
  
          runner.setProperty(cfProvider, JMSConnectionFactoryProvider.CLIENT_LIB_DIR_PATH, "test-lib");
          runner.setProperty(cfProvider, JMSConnectionFactoryProvider.CONNECTION_FACTORY_IMPL,
                  "org.apache.nifi.jms.testcflib.TestConnectionFactory");
          runner.enableControllerService(cfProvider);
          runner.assertNotValid(cfProvider);
      }
  
  }