@Test public void getColorThemeFromSkinFileWhenInCache() throws Exception { ColorTheme cachedColorTheme = new ColorTheme(); cachedColorTheme.put("key", "value1"); LESSSkinFileResourceReference lessSkinFileResourceReference = new LESSSkinFileResourceReference("file", null, null); when(lessResourceReferenceFactory.createReferenceForSkinFile("file")).thenReturn(lessSkinFileResourceReference); when(cache.get(eq(lessSkinFileResourceReference), eq(new FSSkinReference("skin")), eq(new NamedColorThemeReference("colorTheme")))).thenReturn(cachedColorTheme); ColorTheme result = mocker.getComponentUnderTest().getColorThemeFromSkinFile("file", "skin", false); assertEquals(cachedColorTheme, result); assertTrue(result != cachedColorTheme); result.put("key", "value2"); assertNotEquals("value2", cachedColorTheme.get("key")); }
@Override public ColorTheme getColorThemeFromSkinFile(String fileName, boolean force) throws LESSCompilerException { return super.getResult(lessResourceReferenceFactory.createReferenceForSkinFile(fileName), false, true, force); }
DefaultLESSColorThemeConverter extends AbstractCachedCompiler<ColorTheme> implements LESSColorThemeConverter, Initializable { @Override public ColorTheme getColorThemeFromSkinFile(String fileName, boolean force) throws LESSCompilerException { return super.getResult(lessResourceReferenceFactory.createReferenceForSkinFile(fileName), false, true, force); } }
DefaultLESSColorThemeConverter extends AbstractCachedCompiler<ColorTheme> implements LESSColorThemeConverter, Initializable { @Override public ColorTheme getColorThemeFromSkinFile(String fileName, boolean force) throws LESSCompilerException { return super.getResult(lessResourceReferenceFactory.createReferenceForSkinFile(fileName), false, true, force); }  }
DefaultLESSColorThemeConverter extends AbstractCachedCompiler<ColorTheme> implements LESSColorThemeConverter, Initializable { @Override public ColorTheme getColorThemeFromSkinFile(String fileName, boolean force) throws LESSCompilerException { return super.getResult(lessResourceReferenceFactory.createReferenceForSkinFile(fileName), false, true, force); }  @Override void initialize(); @Override ColorTheme getColorThemeFromSkinFile(String fileName, boolean force); @Override ColorTheme getColorThemeFromSkinFile(String fileName, String skin, boolean force); }
DefaultLESSColorThemeConverter extends AbstractCachedCompiler<ColorTheme> implements LESSColorThemeConverter, Initializable { @Override public ColorTheme getColorThemeFromSkinFile(String fileName, boolean force) throws LESSCompilerException { return super.getResult(lessResourceReferenceFactory.createReferenceForSkinFile(fileName), false, true, force); }  @Override void initialize(); @Override ColorTheme getColorThemeFromSkinFile(String fileName, boolean force); @Override ColorTheme getColorThemeFromSkinFile(String fileName, String skin, boolean force);  }