@Test
public void callerContextDifferentFromRequestedClassLoaderReturnsCurrentClassLoader() {

	ServletContext context = mock(ServletContext.class);
	when(context.getMajorVersion()).thenReturn(3);
	when(context.getClassLoader()).thenThrow(new SecurityException("getClassLoader"));
	WebBasedClasspathResolver resolver = new WebBasedClasspathResolver(context);
	
	assertEquals(resolver.getClassLoader(), Thread.currentThread().getContextClassLoader());
}