Search in sources :

Example 1 with ChannelAdaptor

use of org.jpos.q2.iso.ChannelAdaptor in project jPOS by jpos.

the class QFactory2Test method testDestroyQBeanThrowsNullPointerException1.

@Test
public void testDestroyQBeanThrowsNullPointerException1() throws Throwable {
    String[] args = new String[0];
    Hashtable<String, String> hashtable = new Hashtable<String, String>(100, 100.0F);
    hashtable.put("testString", "testString");
    try {
        new QFactory(ObjectName.getInstance("testQFactoryParam1", hashtable), null).destroyQBean(new Q2(args), new ObjectName("testQFactoryParam1", "testQFactoryParam2", "testQFactoryParam3"), new ChannelAdaptor());
        fail("Expected NullPointerException to be thrown");
    } catch (NullPointerException ex) {
        assertNull("ex.getMessage()", ex.getMessage());
    }
}
Also used : Hashtable(java.util.Hashtable) ObjectName(javax.management.ObjectName) ChannelAdaptor(org.jpos.q2.iso.ChannelAdaptor) Test(org.junit.Test)

Aggregations

Hashtable (java.util.Hashtable)1 ObjectName (javax.management.ObjectName)1 ChannelAdaptor (org.jpos.q2.iso.ChannelAdaptor)1 Test (org.junit.Test)1