@Test(expected = IOException.class) public void init_test_resIsIOException() throws IOException { videoCapture.setDevice(device); Exception e = new IOException(); doThrow(e) .when(videoWriter) .init(any(String.class), any(VideoFormat.class), any(float.class), any(int.class)); videoCapture.init(device, ""); }
@Test public void init_test_resIsNoError() throws IOException { videoCapture.setDevice(device); videoCapture.init(device, ""); }