@Test(expected = AmbariLdapException.class)
  public void testShouldAttributeDetectionFailuresResultInAmbariLdapException() throws Exception {
    // GIVEN
    EasyMock.expect(ldapAttributeDetectionServiceMock.detectLdapUserAttributes(EasyMock.anyObject(AmbariLdapConfiguration.class)))
        .andThrow(new AmbariLdapException("Testing ..."));

    replayAll();

    // WHEN
    ldapFacade.detectAttributes(ambariLdapConfiguration);

    // THEN
    // Exception is thrown
  }
Tests whether the facade method call delegates to the proper service call.
The thest is success if the same instance is passed to the service.

@throws Exception
ambari-server/src/test/java/org/apache/ambari/server/ldap/service/AmbariLdapFacadeTest.java