Args { public boolean canChomp() { return canChomp(1); } Args(String[] args); String chomp(); boolean canChomp(); boolean canChomp(int numArgs); String peek(); boolean canPeek();  }
@Test public void canChomp() throws Exception { final Args args = new Args(new String[]{"1", "2", "3"}); final String arg = args.chomp(); assertThat(arg, equalTo("1")); }
@Test public void canChompNumReturnsTrueWhenThereAreNumArgsLeft() throws Exception { final Args args = new Args(new String[]{"1", "2", "3"}); final boolean canChomp = args.canChomp(3); assertThat(canChomp, equalTo(true)); }
@Test public void canChompNumReturnsFalseWhenThereAreNotNumArgsLeft() throws Exception { final Args args = new Args(new String[]{"1", "2", "3"}); final boolean canChomp = args.canChomp(4); assertThat(canChomp, equalTo(false)); }