public void testExtractsThreeFrameAtRegularIntervals() throws Exception { Id id = createBlackboardRecord("youtube", "http://www.youtube.com/dummy"); setAttachment(id, inputAnnotationValue, Fixtures.getAsFile("hero.flv")); process(id); List<Literal> attachmentNames = getAttributes(id, new Path(outputAnnotationValue)); assertEquals(3, attachmentNames.size()); for (Literal name : attachmentNames) { File png = getAttachment(id, name.getStringValue()); assertEquals( URLUtils.readStart(Fixtures.getAsFile("hero_frame.png")), URLUtils.readStart(png)); } }
@Override public File getImage(File video, String time) { try { return Fixtures.getAsFile("hero_frame.png"); } catch (IOException e) { fail(e.getMessage()); } return null; }