### Question:
ClassReloadingStrategy implements ClassLoadingStrategy<ClassLoader> { public static ClassReloadingStrategy of(Instrumentation instrumentation) { if (DISPATCHER.isRetransformClassesSupported(instrumentation)) { return new ClassReloadingStrategy(instrumentation, Strategy.RETRANSFORMATION); } else if (instrumentation.isRedefineClassesSupported()) { return new ClassReloadingStrategy(instrumentation, Strategy.REDEFINITION); } else { throw new IllegalArgumentException("Instrumentation does not support reloading of classes: " + instrumentation); } } ClassReloadingStrategy(Instrumentation instrumentation, Strategy strategy); protected  ClassReloadingStrategy(Instrumentation instrumentation,
                                     Strategy strategy,
                                     BootstrapInjection bootstrapInjection,
                                     Map<String, Class<?>> preregisteredTypes); static ClassReloadingStrategy of(Instrumentation instrumentation); static ClassReloadingStrategy fromInstalledAgent(); static ClassReloadingStrategy fromInstalledAgent(Strategy strategy); Map<TypeDescription, Class<?>> load(ClassLoader classLoader, Map<TypeDescription, byte[]> types); ClassReloadingStrategy reset(Class<?>... type); ClassReloadingStrategy reset(ClassFileLocator classFileLocator, Class<?>... type); ClassReloadingStrategy enableBootstrapInjection(File folder); ClassReloadingStrategy preregistered(Class<?>... type);  }### Answer:
@Test public void testRetransformationDiscovery() throws Exception { Instrumentation instrumentation = mock(Instrumentation.class); when(instrumentation.isRetransformClassesSupported()).thenReturn(true); assertThat(ClassReloadingStrategy.of(instrumentation), notNullValue(ClassReloadingStrategy.class)); }
@Test(expected = IllegalArgumentException.class) public void testNonCompatible() throws Exception { ClassReloadingStrategy.of(mock(Instrumentation.class)); }