/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements. See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You 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 org.apache.logging.log4j.message;

import org.junit.Test;

import static org.junit.Assert.assertTrue;

/**
 *
 */
public class ThreadDumpMessageTest {

    @Test
    public void testMessage() {
        ThreadDumpMessage msg = new ThreadDumpMessage("Testing");

        String message = msg.getFormattedMessage();
        //System.out.print(message);
        assertTrue("No header", message.contains("Testing"));
        assertTrue("No RUNNABLE", message.contains("RUNNABLE"));
        assertTrue("No ThreadDumpMessage", message.contains("ThreadDumpMessage"));
    }
}

@@ -861,16 +861,66 @@
 .Test;%0A%0A
+import java.util.concurrent.locks.ReentrantLock;%0A%0A
 import s
@@ -1418,10 +1418,814 @@
 ;%0A    %7D%0A
+%0A%0A    @Test%0A    public void testMessageWithLocks() %7B%0A        ReentrantLock lock = new ReentrantLock();%0A        lock.lock();%0A        ThreadDumpMessage msg;%0A        synchronized(this) %7B%0A            try %7B%0A                msg = new ThreadDumpMessage(%22Testing%22/* , true */);%0A            %7D finally %7B%0A                lock.unlock();%0A            %7D%0A        %7D%0A%0A        String message = msg.getFormattedMessage();%0A        //System.out.print(message);%0A        assertTrue(%22No header%22, message.contains(%22Testing%22));%0A        assertTrue(%22No RUNNABLE%22, message.contains(%22RUNNABLE%22));%0A        assertTrue(%22No ThreadDumpMessage%22, message.contains(%22ThreadDumpMessage%22));%0A        //assertTrue(%22No Locks%22, message.contains(%22waiting on%22));%0A        //assertTrue(%22No syncronizers%22, message.contains(%22locked syncrhonizers%22));%0A    %7D%0A
 %7D%0A

Enhance test in preparation for showing locks.