### Question:
SlackNotificationListener extends BuildServerAdapter { @Override public void buildInterrupted(SRunningBuild sRunningBuild) { processBuildEvent(sRunningBuild, BuildStateEnum.BUILD_INTERRUPTED); } SlackNotificationListener();  SlackNotificationListener(SBuildServer sBuildServer, ProjectSettingsManager settings,
                                     SlackNotificationMainSettings configSettings, SlackNotificationPayloadManager manager,
                                     SlackNotificationFactory factory); void register(); void getFromConfig(SlackNotification slackNotification, SlackNotificationConfig slackNotificationConfig); @Override void buildStarted(SRunningBuild sRunningBuild); @Override void buildFinished(SRunningBuild sRunningBuild); @Override void buildInterrupted(SRunningBuild sRunningBuild); @Override void beforeBuildFinish(SRunningBuild sRunningBuild); @Deprecated /** This method has been removed from the TeamCity API as of version 7.1 * * @param sBuildType * @param responsibilityInfoOld * @param responsibilityInfoNew * @param isUserAction */ void responsibleChanged(@NotNull SBuildType sBuildType, 
    							   @NotNull ResponsibilityInfo responsibilityInfoOld, 
    							   @NotNull ResponsibilityInfo responsibilityInfoNew, 
    							   boolean isUserAction); @Override void responsibleChanged(SProject project,
			Collection<TestName> testNames, ResponsibilityEntry entry,
			boolean isUserAction); @Override void responsibleChanged(SProject project, TestNameResponsibilityEntry oldTestNameResponsibilityEntry, TestNameResponsibilityEntry newTestNameResponsibilityEntry, boolean isUserAction); @Override void responsibleChanged(@NotNull SBuildType sBuildType,
            @NotNull ResponsibilityEntry responsibilityEntryOld,
            @NotNull ResponsibilityEntry responsibilityEntryNew); @Override void responsibleRemoved(SProject project, TestNameResponsibilityEntry entry); void doPost(SlackNotification notification);  }### Answer:
@Test public void testBuildInterruptedSRunningBuild() throws FileNotFoundException, IOException { BuildState state = new BuildState().setAllEnabled(); projSettings.addNewSlackNotification("", "1234", "my-channel", "myteam", null, true, state, true, true, new HashSet<String>(), true, true, true, true); when(buildHistory.getEntriesBefore(sRunningBuild, false)).thenReturn(finishedSuccessfulBuilds); whl.buildInterrupted(sRunningBuild); verify(factory.getSlackNotification(), times(1)).post(); }