@Test public void testRedefinitionChunkedStrategyIsNotRetransforming() throws Exception { Instrumentation instrumentation = mock(Instrumentation.class); when(instrumentation.isRedefineClassesSupported()).thenReturn(true); assertThat( AgentBuilder.RedefinitionStrategy.REDEFINITION_CHUNKED.isRetransforming(instrumentation), is(false)); }
@Test public void testRedefinitionChunkedStrategyIsEnabled() throws Exception { assertThat(AgentBuilder.RedefinitionStrategy.REDEFINITION_CHUNKED.isEnabled(), is(true)); }
@Test(expected = IllegalArgumentException.class) public void testRedefinitionChunkedStrategyNotSupportedThrowsException() throws Exception { AgentBuilder.RedefinitionStrategy.REDEFINITION_CHUNKED.isRetransforming( mock(Instrumentation.class)); }