// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.codeInsight;

import com.intellij.xml.util.XmlUtil;
import junit.framework.TestCase;

public class XmlUtilTest extends TestCase {

  public void testDecodeEntityRef() {
    assertEquals('&', XmlUtil.getCharFromEntityRef("&amp;"));
    try {
      XmlUtil.getCharFromEntityRef("&unknown;");
      fail("Exception should be thrown");
    }
    catch (AssertionError ignore) {
    }
  }
}

@@ -453,93 +453,105 @@
     
-  fail(%22Exception should be thrown%22);%0A    %7D%0A    catch (AssertionError ignore) %7B%0A    %7D
+%7D%0A    catch (AssertionError ignore) %7B%0A      return;%0A    %7D%0A    fail(%22Exception should be thrown%22);
 %0A  %7D

test fixed