### Question:
Stack { T pop() { if (storage.isEmpty()) { throw new RuntimeException("stack has no value"); } return storage.remove(topIndex()); } Stack();   }### Answer:
@Test(expected = RuntimeException.class) public void whenExceptionThrown() throws Exception { Stack stack = new Stack(); stack.pop(); }