import static org.mockito.Mockito.verify;
import com.google.common.util.concurrent.ListenableFuture;
+import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
@InjectMocks
private PCEServiceWrapper pceServiceWrapperMock;
+ private AutoCloseable closeable;
+
@Before
- public void init() throws NoSuchMethodException {
- MockitoAnnotations.initMocks(this);
+ public void openMocks() throws NoSuchMethodException {
+ closeable = MockitoAnnotations.openMocks(this);
}
@Test
pceResponse.getConfigurationResponseCommon().getResponseMessage());
verify(this.pathComputationServiceMock).pathComputationRequest((any(PathComputationRequestInput.class)));
}
+
+ @After public void releaseMocks() throws Exception {
+ closeable.close();
+ }
}