<?xml version="1.0" encoding="UTF-8"?>
<test-data>
    <test-code>
        <description><![CDATA[
Ok
        ]]></description>
        <expected-problems>0</expected-problems>
        <code><![CDATA[
public class Foo {
    private static final Log LOG = LogFactory.getLog(Foo.class);
}
 ]]>    </code>
    </test-code>
    <test-code>
        <description><![CDATA[
Wrong class name
        ]]></description>
        <expected-problems>1</expected-problems>
        <code><![CDATA[
public class Foo {
    private static final Log LOG = LogFactory.getLog(Bar.class);
}
 ]]>    </code>
    </test-code>
    <test-code>
        <description><![CDATA[
Ok, special case
        ]]></description>
        <expected-problems>0</expected-problems>
        <code><![CDATA[
public class Foo {
    private final Log log;
    Foo(Log log) {
        this.log = log;
    }
}
 ]]>    </code>
    </test-code>
    <test-code>
        <description><![CDATA[
bug 1626232, a seperate variable initialization should not confuse the rule
        ]]></description>
        <expected-problems>0</expected-problems>
        <code><![CDATA[
public class Foo {
    private String bar = "";
    private final Log log;
    Foo(Log log) {
        this.log = log;
    }
}
 ]]>    </code>
    </test-code>
    <test-code>
        <description><![CDATA[
bug 1626232, extra loggers with different names are not allowed by default (use NOPMD if you want them)
        ]]></description>
        <expected-problems>1</expected-problems>
        <code><![CDATA[
public class Foo {
    private static final Log LOG = LogFactory.getLog(Foo.class);
    private static final Log LOG2 = LogFactory.getLog(Foo.class + ".foo");
}
 ]]>    </code>
    </test-code>
</test-data>
