@Test
public void testCollectAttributeValuesThrowsExceptionWhenAttributeNotPresent() {

    String expectedAttributeName = "someAttribute";
    BasicAttributes attributes = new BasicAttributes();
    LinkedList list = new LinkedList();
    try {
        LdapUtils.collectAttributeValues(attributes, expectedAttributeName, list);
        fail("NoSuchAttributeException expected");
    } catch (NoSuchAttributeException expected) {
        assertThat(true).isTrue();
    }
}