@Test
  public void testShouldConfigurationCheckDelegateToTheRightServiceCall() throws Exception {
    // GIVEN
    // the mocks are set up
    ldapConfigurationServiceMock.checkConnection(EasyMock.capture(ambariLdapConfigurationCapture));
    replayAll();
    // WHEN
    // the facade method is called
    ldapFacade.checkConnection(ambariLdapConfiguration);

    // THEN
    // the captured configuration instance is the same the facade method got called with
    Assert.assertEquals("The configuration instance souldn't change before passing it to the service",
        ambariLdapConfiguration, ambariLdapConfigurationCapture.getValue());
  }
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