@Test
public void testEvaluate() throws Exception {

    final Configuration configuration = mock(Configuration.class);
    final SessionState sessionState = mock(SessionState.class);
    final HadoopREPL repl = new HadoopREPL(configuration, sessionState, ImmutableMap.<Call, Command>of(
        call("test"), new Command() {
        @Override
        public void execute(final CommandInvocation call, final SessionState ss) throws REPL.ExitSignal {
            assertEquals("test", call.command());
            assertArrayEquals(new String[0], call.args());
            assertEquals(sessionState, ss);
        }
        @Override
        public Usage usage(final SessionState sessionState) {
            return null;
        }
    }
    ));
    repl.evaluate("test");
    assertEquals("test", Iterables.get(repl.history(), 0));
}