### Question:
DefaultDistributedBuildManager implements DistributedBuildManager, Contextualizable, Initializable { public boolean isAgentAvailable( String buildAgentUrl ) throws ContinuumException { try { if ( pingBuildAgent( buildAgentUrl ) ) { return true; } } catch ( Exception e ) { log.warn( "Disable build agent: {}; Unable to ping due to {}", buildAgentUrl, e ); } disableBuildAgent( buildAgentUrl ); return false; }  void contextualize( Context context ); void initialize(); void reload(); void update( BuildAgentConfiguration agent ); @SuppressWarnings( "unused" ) void prepareBuildProjects( Map<Integer, Integer> projectsBuildDefinitionsMap, BuildTrigger buildTrigger,
                                      int projectGroupId, String projectGroupName, String scmRootAddress, int scmRootId,
                                      List<ProjectScmRoot> scmRoots ); void removeDistributedBuildQueueOfAgent( String buildAgentUrl ); Map<String, List<PrepareBuildProjectsTask>> getProjectsInPrepareBuildQueue(); Map<String, PrepareBuildProjectsTask> getProjectsCurrentlyPreparingBuild(); Map<String, BuildProjectTask> getProjectsCurrentlyBuilding(); Map<String, List<BuildProjectTask>> getProjectsInBuildQueue(); boolean isBuildAgentBusy( String buildAgentUrl ); void cancelDistributedBuild( String buildAgentUrl ); void cancelGroupBuild( int projectGroupId ); void cancelBuild( int projectId ); Map<String, Object> getBuildResult( int projectId ); String getBuildAgentPlatform( String buildAgentUrl ); List<Installation> getAvailableInstallations( String buildAgentUrl ); String generateWorkingCopyContent( int projectId, String directory, String baseUrl, String imageBaseUrl ); Map<String, Object> getFileContent( int projectId, String directory, String filename ); void removeFromPrepareBuildQueue( String buildAgentUrl, int projectGroupId, int scmRootId ); void removeFromBuildQueue( String buildAgentUrl, int projectId, int buildDefinitionId ); void removeFromPrepareBuildQueue( List<String> hashCodes ); void removeFromBuildQueue( List<String> hashCodes ); boolean isProjectInAnyPrepareBuildQueue( int projectId, int buildDefinitionId ); boolean isProjectInAnyBuildQueue( int projectId, int buildDefinitionId ); boolean isProjectCurrentlyPreparingBuild( int projectId, int buildDefinitionId ); boolean isProjectCurrentlyBuilding( int projectId, int buildDefinitionId ); String getBuildAgentUrl( int projectId, int buildDefinitionId ); boolean isAgentAvailable( String buildAgentUrl ); boolean pingBuildAgent( String buildAgentUrl ); List<ProjectRunSummary> getCurrentRuns(); ProjectRunSummary getCurrentRun( int projectId, int buildDefinitionId ); ProjectRunSummary getCanceledRun( int projectId, int buildDefinitionId ); void removeCurrentRun( int projectId, int buildDefinitionId ); void removeCanceledRun( ProjectRunSummary canceled ); SlaveBuildAgentTransportService createSlaveBuildAgentTransportClientConnection( String buildAgentUrl ); void setOverallDistributedBuildQueues(
        Map<String, OverallDistributedBuildQueue> overallDistributedBuildQueues ); void setConfigurationService( ConfigurationService configurationService ); void setProjectDao( ProjectDao projectDao ); void setBuildDefinitionDao( BuildDefinitionDao buildDefinitionDao ); void setBuildResultDao( BuildResultDao buildResultDao ); void setContainer( PlexusContainer container ); void setCurrentRuns( List<ProjectRunSummary> currentRuns ); void setProjectScmRootDao( ProjectScmRootDao projectScmRootDao );  }### Answer:
@Test public void testBuildAgentIsAvailable() throws Exception { assertTrue( distributedBuildManagerStub.isAgentAvailable( TEST_BUILD_AGENT1 ) ); verify( configurationService, never() ).getBuildAgents(); verify( configurationService, never() ).updateBuildAgent( buildAgent1 ); verify( configurationService, never() ).store(); }