public ClassData getClassDataOrNull(String className) {
        ClassData classData = loadBytecodesFromClientCache(className);
        if (classData != null) {
            return classData;
        }
        if (providerMode == UserCodeDeploymentConfig.ProviderMode.OFF) {
            return null;
        }
        classData = loadBytecodesFromParent(className);
        if (classData == null && providerMode == UserCodeDeploymentConfig.ProviderMode.LOCAL_AND_CACHED_CLASSES) {
            classData = loadBytecodesFromCache(className);
        }
        return classData;
    }
@Test
    public void givenProviderModeSetToOFF_whenMapClassContainsClass_thenReturnNull() {
        UserCodeDeploymentConfig.ProviderMode providerMode = OFF;
        String className = "className";
        ClassSource classSource = newMockClassSource();
        ClassLoader parent = getClass().getClassLoader();
        ClassDataProvider provider = createClassDataProvider(providerMode, className, classSource, parent);
        ClassData classData = provider.getClassDataOrNull(className);
        assertNull(classData);
    }