/*
 * Copyright 2000-2017 JetBrains s.r.o.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.intellij.java.codeInsight.daemon.quickFix;

import com.intellij.codeInsight.daemon.quickFix.LightQuickFixTestCase;
import com.intellij.codeInspection.AnnotateMethodFix;
import com.intellij.codeInspection.LocalInspectionTool;
import com.intellij.codeInspection.nullable.NullableStuffInspection;
import com.intellij.pom.java.LanguageLevel;
import org.jetbrains.annotations.NotNull;

public class AnnotateMethodTest extends LightQuickFixTestCase {
  @Override
  protected String getBasePath() {
    return "/codeInsight/daemonCodeAnalyzer/quickFix/annotateMethod";
  }

  @NotNull
  @Override
  protected LocalInspectionTool[] configureLocalInspectionTools() {
    return new LocalInspectionTool[]{new NullableStuffInspection(){
      @Override
      protected AnnotateMethodFix createAnnotateMethodFix(String defaultNotNull, String[] annotationsToRemove) {
        return new AnnotateMethodFix(defaultNotNull, annotationsToRemove);
      }
    }};
  }

  @Override
  protected boolean shouldBeAvailableAfterExecution() {
    return false;
  }

  public void test() throws Exception { doAllTests(); }

  @Override
  protected LanguageLevel getLanguageLevel() {
    return LanguageLevel.JDK_1_5;
  }
}
abstract class P2 {
    @NotNull<caret>
    String foo(@NotNull String p) {
        return p;
    }

    Object o = new P2() {
        @Override
        String foo(String p) {
            return "";
        }
    };
}
@@ -1807,222 +1807,4 @@
  %7D%0A%7D
-%0Aabstract class P2 %7B%0A    @NotNull%3Ccaret%3E%0A    String foo(@NotNull String p) %7B%0A        return p;%0A    %7D%0A%0A    Object o = new P2() %7B%0A        @Override%0A        String foo(String p) %7B%0A            return %22%22;%0A        %7D%0A    %7D;%0A%7D

remove useless and mysterious class P2