Junit verify method never runs passing when it should fail
<p>I have this unit test: </p>

<pre><code>@RunWith (MockitoJUnitRunner.class)
public class RefChangEventTest {
    @Mock
    RefChange ref;

    @Mock
    SEPCommits sepCommits;

    @Mock
    SEPRefChangeEvent sepRefChangeEvent;

    @Mock
    RepositoryRefsChangedEvent refsChangedEvent;

    @Mock
    Repository repo;

    @Test
    public void gitNotesAreIgnored() throws Exception {
        Collection&lt;RefChange&gt; refList = new ArrayList&lt;RefChange&gt;(1);
        ArrayList commitListMock = mock(ArrayList.class);
        refList.add(ref);
        when(refsChangedEvent.getRefChanges()).thenReturn(refList);
        when(refsChangedEvent.getRepository()).thenReturn(repo);
        when(ref.getRefId()).thenReturn("refs/heads/foo");
        when(sepRefChangeEvent.makeArrayList()).thenReturn(commitListMock);

        sepRefChangeEvent.processEvent(refsChangedEvent);
        verify(sepCommits, never()).findCommitInfo(ref, repo, commitListMock);
    }

}
</code></pre>

<p>and the source code to match it is here: </p>

<pre><code>public ArrayList&lt;Message&gt; makeArrayList() {
    return new ArrayList&lt;Message&gt;();
}

@Override
public List&lt;Message&gt; processEvent(RepositoryRefsChangedEvent event) {
    ArrayList&lt;Message&gt; commitList = makeArrayList();

    for (RefChange refChange : event.getRefChanges()) {
        LOGGER.info("checking ref change refId={} fromHash={} toHash={} type={}", refChange.getRefId(), refChange.getFromHash(),
                refChange.getToHash(), refChange.getType());

        if (refChange.getRefId().startsWith(REF_BRANCH)) {
            if (refChange.getType() == RefChangeType.ADD &amp;&amp; isDeleted(refChange)) {
                LOGGER.info("Deleted a ref that never existed. This shouldn't ever occur.");
            }
            else if (isDeleted(refChange) || isCreated(refChange)) {
                branchCreation(refChange, event.getRepository(), commitList);
            }
            else {
                sepCommits.findCommitInfo(refChange, event.getRepository(), commitList);
            }
        }
        else {
            LOGGER.info("This type of refChange is not supported.\n refId={} fromHash={} toHash={} type={}", refChange.getRefId(), refChange.getFromHash(),
                    refChange.getToHash(), refChange.getType());
        }
    }
    return commitList;
}
</code></pre>

<p>The test I have written should fail. The refID is <code>refs/heads/foo</code> and that should invoke the method that I'm testing should never be called. But, when I run this test, it passes with flying colors. Where am I messing up?</p>

<p>Yes I know PowerMockito can mock constructors, I made the simple <code>makeArrayList()</code> method to quickly write this unit test. </p>