@Override protected void tearDown() throws Exception { BundleContext context = HistoryServiceLick.bc; context.ungetService(this.historyServiceRef); this.history = null; this.historyService = null; this.historyServiceRef = null; }
@Override protected void setUp() throws Exception { BundleContext context = HistoryServiceLick.bc; historyServiceRef = context.getServiceReference(HistoryService.class.getName()); this.historyService = (HistoryService) context.getService(historyServiceRef); HistoryID testID = HistoryID.createFromRawID(new String[] {"test", "alltests"}); this.history = this.historyService.createHistory(testID, recordStructure); }