JndiHelper { public static void unbind(Collection<? extends AdaptrisComponent> components) throws CoreException { unbind(createContext(), components, false); }  static String createJndiName(AdaptrisComponent object); static void bind(Collection<? extends AdaptrisComponent> components); static void bind(AdaptrisComponent adaptrisComponent); static void bind(Collection<? extends AdaptrisComponent> components, boolean debug); static void bind(AdaptrisComponent adaptrisComponent, boolean debug); static void bind(Context ctx, Collection<? extends AdaptrisComponent> components, boolean debug); static void bind(Context ctx, AdaptrisComponent component, boolean debug); static void unbind(Collection<? extends AdaptrisComponent> components); static void unbind(Collection<? extends AdaptrisComponent> components, boolean debug); static void unbind(AdaptrisComponent component, boolean debug); static void unbind(Context ctx, Collection<? extends AdaptrisComponent> components, boolean debug); static void unbind(Context ctx, AdaptrisComponent component, boolean debug); static void unbindQuietly(Context ctx, Collection<? extends AdaptrisComponent> components, boolean debug); static void unbindQuietly(Context ctx, AdaptrisComponent component, boolean debug);  }
@Test public void testUnbindNullTransactionManager() throws Exception { TransactionManager transactionManager = null; try { JndiHelper.unbind(transactionManager, false); } catch (CoreException expected) { fail("Should not error, just ignore."); } }
@Test public void testUnbindNullTransactionManager_Debug() throws Exception { TransactionManager transactionManager = null; try { JndiHelper.unbind(transactionManager, true); } catch (CoreException expected) { fail("Should not error, just ignore."); } }
@Test public void testUnbindUnboundTransactionManager() throws Exception { TransactionManager transactionManager = new DummyTransactionManager(getName()); try { JndiHelper.unbind(transactionManager, false); fail(); } catch (CoreException expected) { } }
@Test public void testUnbindUnboundTransactionManager_Debug() throws Exception { TransactionManager transactionManager = new DummyTransactionManager(getName()); try { JndiHelper.unbind(transactionManager, true); fail(); } catch (CoreException expected) { } }