/**
   * Tests whether the canBeApplied method returns false for variation points that have a location
   * that is not supported by the refactoring.
   */
  @Test
  public void testIfCanBeAppliedWithInvalidLocation() {
    Commentable location = MembersFactory.eINSTANCE.createClassMethod();
    Enumeration implEl1 = ClassifiersFactory.eINSTANCE.createEnumeration();
    Enumeration implEl2 = ClassifiersFactory.eINSTANCE.createEnumeration();

    implEl1.setName("A");
    implEl2.setName("B");

    VariationPoint vpMock =
        RefactoringTestUtil.getSimpleVPMock(
            VariabilityType.OPTXOR,
            Extensible.NO,
            BindingTime.COMPILE_TIME,
            location,
            implEl1,
            implEl2);

    IfStaticConfigClassEnumerationInMemberContainer refactoring =
        new IfStaticConfigClassEnumerationInMemberContainer();

    assertThat(refactoring.canBeAppliedTo(vpMock).getSeverity(), is(Diagnostic.ERROR));
  }