### Question:
JndiUtil { public static void unbindSessionManager(final String jndiName) { LOG.info("Unbinding Hibersap SessionManager from JNDI name '" + jndiName + "'"); try { Context ctx = new InitialContext(); ctx.unbind(jndiName); } catch (NamingException e) { LOG.warn("Failed to unbind Hibersap SessionManager binding for JNDI name [" + jndiName + "]", e); } } private  JndiUtil(); static void rebindSessionManager(final SessionManager sessionManager, final String jndiName); static void unbindSessionManager(final String jndiName);  }### Answer:
@Test public void unbindSessionManagerActuallyUnbindsItFromJndi() throws Exception { JndiUtil.unbindSessionManager(JNDI_NAME); verify(initialCtx).unbind(JNDI_NAME); }
@Test public void unbindSessionManagerWithNamingExceptionDoesNotThrowException() throws Exception { JndiUtil.unbindSessionManager(JNDI_NAME); verify(initialCtx).unbind(JNDI_NAME); }