| /* |
| * Copyright (c) 2007 Mockito contributors |
| * This program is made available under the terms of the MIT License. |
| */ |
| |
| package org.mockito.exceptions.base; |
| |
| import org.junit.Test; |
| import org.mockitoutil.TestBase; |
| |
| import static junit.framework.TestCase.assertEquals; |
| import static junit.framework.TestCase.fail; |
| |
| public class MockitoExceptionTest extends TestBase { |
| |
| private void throwIt() { |
| throw new MockitoException("boom"); |
| } |
| |
| @Test |
| public void shouldKeepUnfilteredStackTrace() { |
| try { |
| throwIt(); |
| fail(); |
| } catch (MockitoException e) { |
| assertEquals("throwIt", e.getUnfilteredStackTrace()[0].getMethodName()); |
| } |
| } |
| } |