@Test public void shouldThrowError() throws Exception { thrown.expect(NoSuchMethodError.class); thrown.expectMessage("imGoingAway"); LibraryInvokesRemovedMethod.main(new String[0]); }
public static void main(String[] args) { MethodWillBeRemoved methodWillBeRemoved = new MethodWillBeRemoved(); methodWillBeRemoved.butIWillStay(); B.doThings(methodWillBeRemoved); }
LibraryInvokesRemovedMethod { public static void main(String[] args) { MethodWillBeRemoved methodWillBeRemoved = new MethodWillBeRemoved(); methodWillBeRemoved.butIWillStay(); B.doThings(methodWillBeRemoved); } }
LibraryInvokesRemovedMethod { public static void main(String[] args) { MethodWillBeRemoved methodWillBeRemoved = new MethodWillBeRemoved(); methodWillBeRemoved.butIWillStay(); B.doThings(methodWillBeRemoved); }  }
LibraryInvokesRemovedMethod { public static void main(String[] args) { MethodWillBeRemoved methodWillBeRemoved = new MethodWillBeRemoved(); methodWillBeRemoved.butIWillStay(); B.doThings(methodWillBeRemoved); }  static void main(String[] args); }
LibraryInvokesRemovedMethod { public static void main(String[] args) { MethodWillBeRemoved methodWillBeRemoved = new MethodWillBeRemoved(); methodWillBeRemoved.butIWillStay(); B.doThings(methodWillBeRemoved); }  static void main(String[] args);  }