third_party/closure-compiler/src/test/com/google/javascript/jscomp/IntegrationTest.java
/**
   * @param js A snippet of JavaScript in which alert('No one ever calls me'); is called
   *     in a method which is never called. Verifies that the method is stripped out by
   *     asserting that the result does not contain the string 'No one ever calls me'.
   */
@param js A snippet of JavaScript in which alert('No one ever calls me'); is called
in a method which is never called. Verifies that the method is stripped out by
asserting that the result does not contain the string 'No one ever calls me'.
@param js A snippet of JavaScript in which alert ( ' No one ever calls me ' ) ; is called in a method which is never called . Verifies that the method is stripped out by asserting that the result does not contain the string ' No one ever calls me ' .
private void testES6StaticsAreRemoved(String js) {
    CompilerOptions options = createCompilerOptions();
    options.setLanguageIn(LanguageMode.ECMASCRIPT_2015);
    options.setLanguageOut(LanguageMode.ECMASCRIPT3);
    CompilationLevel.ADVANCED_OPTIMIZATIONS.setOptionsForCompilationLevel(options);
    Compiler compiler = compile(options, js);
    assertThat(compiler.getErrors()).isEmpty();
    String result = compiler.toSource(compiler.getJsRoot());
    assertThat(result).isNotEmpty();
    assertThat(result).doesNotContain("No one ever calls me");
  }
private void testES6StaticsAreRemoved ( String js ) { CompilerOptions options = createCompilerOptions ( ) ; options . setLanguageIn ( LanguageMode . ECMASCRIPT_2015 ) ; options . setLanguageOut ( LanguageMode . ECMASCRIPT3 ) ; CompilationLevel . ADVANCED_OPTIMIZATIONS . setOptionsForCompilationLevel ( options ) ; Compiler compiler = compile ( options , js ) ; assertThat ( compiler . getErrors ( ) ) . isEmpty ( ) ; String result = compiler . toSource ( compiler . getJsRoot ( ) ) ; assertThat ( result ) . isNotEmpty ( ) ; assertThat ( result ) . doesNotContain ( "No one ever calls me" ) ; }
@param js A snippet of JavaScript in which alert('No one ever calls me'); is called
     in a method which is never called.
@param js A snippet of JavaScript in which alert ( ' No one ever calls me ' ) ; is called in a method which is never called .