• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2017 Mockito contributors
3  * This program is made available under the terms of the MIT License.
4  */
5 package org.mockitousage.bugs;
6 
7 import org.junit.Test;
8 import org.mockito.Mockito;
9 
10 /**
11  * Verifies #688.
12  */
13 public class EnabledMockingInterfaceCloneMethodTest {
14 
15     @Test
ensure_mocking_interface_clone_method_doesnot_throw_IllegalAccessError()16     public void ensure_mocking_interface_clone_method_doesnot_throw_IllegalAccessError() {
17         CloneableInterface ci = Mockito.mock(CloneableInterface.class);
18         Mockito.when(ci.clone()).thenReturn(ci);
19     }
20 
21     interface CloneableInterface extends Cloneable {
clone()22         CloneableInterface clone();
23     }
24 }
25