<?xml version="1.0" encoding="UTF-8"?>
<test-data xmlns="http://pmd.sourceforge.net/rule-tests"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://pmd.sourceforge.net/rule-tests https://pmd.sourceforge.io/rule-tests_1_0_0.xsd">
    <code-fragment id="unnecessary-not-expression">
        <![CDATA[
    public class Example {
        public int foo(int a, int b) {
            if (!(a > b)) {
                return -1;
            }
            if (!(a == b)) {
                return -1;
            }
            if (!(a != b)) {
                return -1;
            }
            if (!(a > 0 && b > 0)) {
                return 1;
            }
            if (!(a == 0 && b >= 0)) {
                return 1;
            }
            return 0;
        }
    }
        ]]>
    </code-fragment>
    <test-code>
        <description>unnecessary not operator can be removed</description>
        <expected-problems>3</expected-problems>
        <expected-linenumbers>3,6,9</expected-linenumbers>
        <code-ref id="unnecessary-not-expression"/>
    </test-code>
</test-data>