@Test
public void removeRecording() throws Exception {

  long currentTime = System.currentTimeMillis();
  String id = "Recording1";
  MediaPackage mediaPackage = generateEvent(Opt.some(id));
  schedSvc.addEvent(new Date(currentTime + 10 * 1000), new Date(currentTime + 3610000), "Device A",
          Collections.<String> emptySet(), mediaPackage, wfProperties, Collections.<String, String> emptyMap(),
          Opt.<String> none());
  schedSvc.updateRecordingState(id, CAPTURING);
  assertEquals(1, schedSvc.getKnownRecordings().size());
  String id2 = "Recording2";
  MediaPackage mediaPackageB = generateEvent(Opt.some(id2));
  schedSvc.addEvent(new Date(currentTime + 10 * 1000), new Date(currentTime + 3610000), "Device B",
          Collections.<String> emptySet(), mediaPackageB, wfProperties, Collections.<String, String> emptyMap(),
          Opt.<String> none());
  schedSvc.updateRecordingState(id2, UPLOADING);
  assertEquals(2, schedSvc.getKnownRecordings().size());
  verifyRecording("notAnRecording", null);
  verifyRecording(id, CAPTURING);
  verifyRecording(id2, UPLOADING);
  assertEquals(2, schedSvc.getKnownRecordings().size());
  try {
    schedSvc.removeRecording(id);
  } catch (NotFoundException e) {
    fail();
  }
  try {
    schedSvc.removeRecording("asdfasdf");
    fail();
  } catch (NotFoundException e) {
    assertNotNull(e);
  }
  verifyRecording("notAnRecording", null);
  verifyRecording(id, null);
  verifyRecording(id2, UPLOADING);
  assertEquals(1, schedSvc.getKnownRecordings().size());
}