### Question:
BackendProviderResolver { public Set<TraceeBackendProvider> getBackendProviders() { final Map<ClassLoader, Set<TraceeBackendProvider>> cacheCopy = providersPerClassloader; final Set<TraceeBackendProvider> providerFromContextClassLoader = getTraceeProviderFromClassloader(cacheCopy, GetClassLoader.fromContext()); if (!providerFromContextClassLoader.isEmpty()) { return providerFromContextClassLoader; } else { return getTraceeProviderFromClassloader(cacheCopy, GetClassLoader.fromClass(BackendProviderResolver.class)); } }  Set<TraceeBackendProvider> getBackendProviders();  }### Answer:
@Test public void shouldReturnClassloaderFromContext() throws Exception { final Set<TraceeBackendProvider> contextClassloader = new HashSet<>(); contextClassloader.add(mock(TraceeBackendProvider.class)); BackendProviderResolver resolver = PowerMockito.spy(new BackendProviderResolver()); when(resolver, method(BackendProviderResolver.class, "loadProviders", ClassLoader.class)) .withArguments(BackendProviderResolver.GetClassLoader.fromContext()) .thenReturn(contextClassloader); assertThat(resolver.getBackendProviders(), is(equalTo(contextClassloader))); }