@Test(expected = AmbariLdapException.class)
  public void testShouldAttributeCheckFailuresResultInAmbariLdapException() throws Exception {
    // GIVEN
    Map<String, Object> parameters = Maps.newHashMap();
    parameters.put(AmbariLdapFacade.Parameters.TEST_USER_NAME.getParameterKey(), "testUser");
    parameters.put(AmbariLdapFacade.Parameters.TEST_USER_PASSWORD.getParameterKey(), "testPassword");

    EasyMock.expect(ldapConfigurationServiceMock.checkUserAttributes(EasyMock.anyString(), EasyMock.anyString(),
        EasyMock.anyObject(AmbariLdapConfiguration.class))).andThrow(new AmbariLdapException("Testing ..."));

    replayAll();

    // WHEN
    Set<String> testUserGroups = ldapFacade.checkLdapAttributes(parameters, 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