SameClassDifferentArtifact { public static void main(String[] args) { A a = new A(); a.methodOne("hi from main"); a.methodTwo("hi again from main"); B.methodShouldBeMissing(); }  static void main(String[] args);  }
@Test public void shouldThrowError() throws Exception { thrown.expect(NoSuchMethodError.class); thrown.expectMessage("A.methodTwo"); SameClassDifferentArtifact.main(new String[0]); }