@Before
 public void setUp() throws Exception {
   createProgrammes();
   TVProgrammeMetadataServer mockServer = mock(TVProgrammeMetadataServer.class);
   when(mockServer.getProgrammeStore()).thenReturn(store);
   Application.setCurrent(mockServer);
 }
Пример #2
0
 /** Clears the thread local variables set by the Restlet API and engine. */
 public static void clearThreadLocalVariables() {
   Response.setCurrent(null);
   Context.setCurrent(null);
   org.restlet.routing.VirtualHost.setCurrent(null);
   org.restlet.Application.setCurrent(null);
 }