@Test
public void testDoubleClose() throws Exception {

    final DelegatingContext delegatingContext = new DelegatingContext(
            keyedObjectPoolMock, contextMock, DirContextType.READ_ONLY);
    delegatingContext.close();
    // noop close
    delegatingContext.close();
    verify(keyedObjectPoolMock, times(1)).returnObject(DirContextType.READ_ONLY, contextMock);
}