@Before
public void setUpAppContext() {
WebApplicationContext appContext = mock(WebApplicationContext.class);
when(appContext.getBeanNamesForType(StyleHandler.class)).thenReturn(new String[]{"ysldHandler","sldHandler"});
when(appContext.getBean("ysldHandler")).thenReturn(new YsldHandler());
when(appContext.getBean("sldHandler")).thenReturn(new SLDHandler());
new GeoServerExtensions().setApplicationContext(appContext);
}