KinectRecognizer { public void startRecognition() { recognitionThread = new KinectRecognitionThread(this); recognitionThread.start(); isRecognizing = true; } KinectRecognizer(final KinectSpokenInput spokenInput); void allocate(); boolean isAllocated(); void startRecognition(); boolean isRecognizing(); void stopRecognition(); void deallocate();  }
@Test public void testStartRecognition() throws Exception { final KinectSpokenInput input = new KinectSpokenInput(); final MockSpokenInputListener listener = new MockSpokenInputListener(); input.addListener(listener); final KinectRecognizer recognizer = new KinectRecognizer(input); recognizer.allocate(); recognizer.startRecognition(); LOGGER.info("Say 'FORWARD'!"); listener.waitSize(1, 10000); final SpokenInputEvent event = listener.get(0); final InputEvent inputEvent = (InputEvent) event; final KinectRecognitionResult result = (KinectRecognitionResult) inputEvent .getInputResult(); Assert.assertEquals("FORWARD", result.getUtterance()); }