@Test
public void testEvaluateUnknownCommand() throws Exception {

    final Configuration configuration = mock(Configuration.class);
    final SessionState sessionState = mock(SessionState.class);
    doAnswer(new Answer() {
        @Override
        public Object answer(final InvocationOnMock invocationOnMock) throws Throwable {
            assertEquals("Unknown command \"test\"", String.format(invocationOnMock.getArguments()[0].toString(), invocationOnMock.getArguments()[1]));
            return null;
        }
    }).when(sessionState).output(anyString(), any(Object[].class));
    final HadoopREPL repl = new HadoopREPL(configuration, sessionState, ImmutableMap.<Call, Command>of());
    repl.evaluate("test");
    assertEquals("test", Iterables.get(repl.history(), 0));
}