@@ -0,0 +1,1787 @@
+/*%0A * Copyright 2000-2014 JetBrains s.r.o.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A * http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage com.intellij.util.ui;%0A%0Aimport org.junit.Assert;%0Aimport org.junit.Test;%0A%0A/**%0A * @author Sergey.Malenkov%0A */%0Apublic class UIUtilTest %7B%0A  @Test%0A  public void testHtmlBody() %7B%0A    testHtmlBody(%22simple text%22, %22simple text%22);%0A    testHtmlBody(%22%3Cbody%3Emulti%3Cbr%3Eline%3C/body%3E%22, %22%3Cbody%3Emulti%5Cnline%3C/body%3E%22);%0A    testHtmlBody(%22normal html%22, %22%3Chtml%3E%3Cbody%3Enormal html%3C/body%3E%3C/html%3E%22);%0A    testHtmlBody(%22no body%22, %22%3Chtml%3Eno body%3C/html%3E%22);%0A    testHtmlBody(%22no closing tags%22, %22%3Chtml%3E%3Cbody%3Eno closing tags%22);%0A    testHtmlBody(%22no closing body tag%22, %22%3Chtml%3E%3Cbody%3Eno closing body tag%3C/html%3E%22);%0A    testHtmlBody(%22no closing html tag%22, %22%3Chtml%3E%3Cbody%3Eno closing html tag%3C/body%3E%22);%0A    testHtmlBody(%22mixed closing tags%22, %22%3Chtml%3E%3Cbody%3Emixed closing tags%3C/html%3E%3C/body%3E%22);%0A    testHtmlBody(%22%3C!--comment--%3E%22, %22%3Chtml%3E%3Cbody%3E%3C!--comment--%3E%3C/body%3E%3C/html%3E%22);%0A    testHtmlBody(%22leading comment%22, %22%3C!--comment--%3E%3Chtml%3E%3Cbody%3Eleading comment%3C/body%3E%3C/html%3E%22);%0A    testHtmlBody(%22trailing comment%22, %22%3Chtml%3E%3Cbody%3Etrailing comment%3C/body%3E%3C/html%3E%3C!--comment--%3E%22);%0A  %7D%0A%0A  private static void testHtmlBody(String expectedBody, String actualHTML) %7B%0A    Assert.assertEquals(expectedBody, UIUtil.getHtmlBody(actualHTML));%0A  %7D%0A%7D%0A

Test UIUtil.getHtmlBody