### Question:
HelperClassManager { @Nullable protected abstract T doGetForClassLoaderOfClass(Class<?> classOfTargetClassLoader) throws Exception; protected  HelperClassManager(ElasticApmTracer tracer, String implementation, String[] additionalHelpers); @Nullable T getForClassLoaderOfClass(Class<?> classOfTargetClassLoader);  }### Answer:
@Test void testFailOnlyOnceAnyClassLoader() throws ClassNotFoundException { final HelperClassManager<Object> helperClassManager = HelperClassManager.ForAnyClassLoader.of(mock(ElasticApmTracer.class), "co.elastic.apm.agent.bci.NonExistingHelperClass"); URL[] urls = {getClass().getProtectionDomain().getCodeSource().getLocation()}; ClassLoader targetClassLoader1 = new URLClassLoader(urls, getClass().getClassLoader().getParent()); Class libClass1 = targetClassLoader1.loadClass("co.elastic.apm.agent.bci.HelperClassManagerTest$InnerTestClass$LibClass"); assertFailLoadingOnlyOnce(helperClassManager, libClass1); ClassLoader targetClassLoader2 = new URLClassLoader(urls, getClass().getClassLoader().getParent()); Class libClass2 = targetClassLoader2.loadClass("co.elastic.apm.agent.bci.HelperClassManagerTest$InnerTestClass$LibClass"); assertFailLoadingOnlyOnce(helperClassManager, libClass2); assertThatCode(() -> helperClassManager.doGetForClassLoaderOfClass(libClass1)).doesNotThrowAnyException(); }