@Test
lic void testBind_NamingException() throws Exception {

pectGetReadWriteContext();
ject expectedObject = new Object();
sicAttributes expectedAttributes = new BasicAttributes();
    javax.naming.NameNotFoundException ne = new javax.naming.NameNotFoundException();
    doThrow(ne).when(dirContextMock).bind(nameMock, expectedObject, expectedAttributes);
y {
ested.bind(nameMock, expectedObject, expectedAttributes);
ail("NameNotFoundException expected");
tch (NameNotFoundException expected) {
ssertThat(true).isTrue();
    verify(dirContextMock).close();
}