@Test(expected = IllegalArgumentException.class) public void checkValueTerseWay2() throws Exception { checkerWithException.checkValue(0); }
public int checkValue(final int amount) { if (amount == 0) { throw new IllegalArgumentException("value is 0"); } return 0; }
CheckerWithException { public int checkValue(final int amount) { if (amount == 0) { throw new IllegalArgumentException("value is 0"); } return 0; } }
CheckerWithException { public int checkValue(final int amount) { if (amount == 0) { throw new IllegalArgumentException("value is 0"); } return 0; }  }
CheckerWithException { public int checkValue(final int amount) { if (amount == 0) { throw new IllegalArgumentException("value is 0"); } return 0; }  int checkValue(final int amount); }
CheckerWithException { public int checkValue(final int amount) { if (amount == 0) { throw new IllegalArgumentException("value is 0"); } return 0; }  int checkValue(final int amount);  }