ClassMissing { public static void main(String[] args) { B.classShouldBeMissing(); }  static void main(String[] args);  }
@Test public void shouldThrowError() throws Exception { thrown.expect(NoClassDefFoundError.class); thrown.expectMessage("WillGoAway"); ClassMissing.main(new String[0]); }