public void testCompilationPlugins() throws Exception {
TestStyleAdapter adapter = TestStyleAdapter.compilation(observer);
when(locator.get(StyleAdapter.class)).thenReturn(adapter);
DefDescriptor<StyleDef> desc = addStyleDef(".THIS{color:red}");
StyleDef def = desc.getDef();
assertEquals("expected plugin to run at compilation", 1, observer.count);
def.getCode();
assertEquals("did not expect plugin to run at runtime", 1, observer.count);
}