ISpeechAsr extends RestcommUntypedActor implements SpeechRecognizerEvent { private AsrInfo info() { return new AsrInfo(languages.keySet()); } ISpeechAsr(final Configuration configuration); @Override void onReceive(final Object message); @Override void stateChanged(final int event, final int value, final Exception exception);  }
@SuppressWarnings("unchecked") @Test public void testInfo() { new JavaTestKit(system) { { final ActorRef observer = getRef(); asr.tell(new GetAsrInfo(), observer); final AsrResponse<AsrInfo> response = expectMsgClass(FiniteDuration.create(30, TimeUnit.SECONDS), AsrResponse.class); assertTrue(response.succeeded()); final Set<String> languages = response.get().languages(); assertTrue(languages.contains("en")); assertTrue(languages.contains("en-gb")); assertTrue(languages.contains("es")); assertTrue(languages.contains("it")); assertTrue(languages.contains("fr")); assertTrue(languages.contains("pl")); assertTrue(languages.contains("pt")); } }; }