java junit abstract method 테스트 시
public abstract class TestOpenClass { public String testOnlyMethod() { } } public class TestOpenClassTest { @Mock private TestOpenClassTest testOpenClass; @Before public void setUp() { testOpenClass = Mockito.mock(TestOpenClassTest.class, Mockito.CALLS_REAL_METHODS); } @Test public void test() { testOpenClass.testOnlyMethod() ...... } } java abstract 메서드 테스트시 활용