import org.junit.Assert;
import org.junit.Test;

public class ReturnTypeChangeTest {

  @Test
  public void shouldThrowError() throws Exception {
    Throwable ex = Assert.assertThrows(NoSuchMethodError.class,
        () -> ReturnTypeChange.main(new String[0]));
    Assert.assertTrue(ex.getMessage().contains(")Ljava/lang/String;"));
  }
}

@@ -260,77 +260,454 @@
 ));%0A
+%0A
     
-Assert.assertTrue(ex.getMessage().contains(%22)Ljava/lang/String;%22)
+// the message for NoSuchMethodError seems to have changed after Java 8%0A    String message = System.getProperty(%22java.vm.specification.version%22).startsWith(%221.8%22)%0A                     ? %22SpecificReturnType.aMethod(Ljava/lang/String;)Ljava/lang/String;%22%0A                     : %22'java.lang.String SpecificReturnType.aMethod(java.lang.String)'%22;%0A%0A    Assert.assertEquals(%22Exception message: %22 + ex.getMessage(),%0A        ex.getMessage(), message
 );%0A 

fix failure in return-type-change integration test