title: validity of using verifyNoMoreInteractions() to force future test update
body: <p>One of my colleagues uses Mockito.verifyNoMoreInteractions() in JUnit tests to ensure that possible future changes to the tested code will make the test fail and force future developers to update tests when they'll change the tested code.</p>
  
  <p>Example pseudocode:</p>
  
  <pre><code>class TestedClass {
    DependencyA dependency1;
    DependencyB dependency2;
    DependencyC dependency3;
  
    public void testedMethod(SomeClass a) {
      if(a == null) {
          return;
      }
  
      //in real code there are over a dozen of such calls, example code 
      //is simplified for clarity
      dependency1.doA();
      dependency2.doB();
      dependency3.doC();
      //future developer might add dependency3.doOtherC(); here
    }
  }
  
  class TestedClassTest {
      @Mock DependencyA dependencyAMock;
      @Mock DependencyB dependencyBMock;
      @Mock DependencyC dependencyCMock;
      @Mock SomeObject someObejctMock;
  
      TestedClass testedObject;
  
      @Before
      public void setUp() throws Exception {
          MockitoAnnotations.initMocks(this);
  
          testedObject = new TestedObject(dependencyAMock, dependencyBMock, dependencyCMock);
      }
  
      @Test
      public void shouldCallDependencyMethods_OnTestedMethod_GivenSomeClassNotNull() {
          testedObject.testedMethod(someObjectMock);
  
          then(dependencyAMock).should().doA();
          then(dependencyBMock).should().doB();
          then(dependencyCMock).should().doC();
  
          //is this check acceptable ?
          Mockito.verifyNoMoreInteractions(dependencyAMock, dependencyBMock, dependencyCMock);
      }
  }
  </code></pre>
  
  <p>Mockito documentation warns against such practise (<a href="https://static.javadoc.io/org.mockito/mockito-core/2.18.0/org/mockito/Mockito.html#finding_redundant_invocations" rel="nofollow noreferrer">https://static.javadoc.io/org.mockito/mockito-core/2.18.0/org/mockito/Mockito.html#finding_redundant_invocations</a>):</p>
  
  <pre><code>A word of warning: Some users who did a lot of classic, expect-run-verify mocking tend to use verifyNoMoreInteractions() very often, even in every test method. verifyNoMoreInteractions() is not recommended to use in every test method. verifyNoMoreInteractions() is a handy assertion from the interaction testing toolkit. Use it only when it's relevant. Abusing it leads to overspecified, less maintainable tests
  </code></pre>
  
  <p>We talked about that and he argued that in case of future changes in tested code (adding new dependency method calls, like dependency3.doOtherC() in example code, which theoretically might happen, but don't necessarily have to), developers introducing such changes probably won't remember about updating the tests with relevant check (which indeed happened a few times already in our project). Failing the test by detecting such new changes with verifyNoMoreInteractions() will force them to update the test as well. </p>
  
  <p>Since I'm tasked with code review, I have to take a stance about such solution. While Mockito documentation is clearly against it, I have to admit that I see a purpose in such "defensive" verification in this specific situation.</p>
  
  <p>Is such solution acceptable in this situation ? Are there any alternative ways to ensure that tests will be updated ?</p>