VerificationDataImplTest.java revision 2637d96c202372854a7c71466ddcc6e90fc4fc53
1/*
2 * Copyright (c) 2007 Mockito contributors
3 * This program is made available under the terms of the MIT License.
4 */
5package org.mockito.internal.verification;
6
7import org.junit.Test;
8import org.mockito.exceptions.base.MockitoException;
9import org.mockito.internal.invocation.InvocationBuilder;
10import org.mockito.internal.invocation.InvocationMatcher;
11import org.mockitoutil.TestBase;
12
13import static junit.framework.TestCase.fail;
14
15public class VerificationDataImplTest extends TestBase {
16
17    @Test
18    public void shouldToStringBeNotVerifiable() throws Exception {
19        InvocationMatcher toString = new InvocationBuilder().method("toString").toInvocationMatcher();
20        try {
21            new VerificationDataImpl(null, toString);
22            fail();
23        } catch (MockitoException e) {}
24    }
25}
26