<?xml version="1.0" encoding="UTF-8"?>
<test-data>

	<code-fragment id="sets-ok"><![CDATA[
	    public class Foo {   
            private void method() {  
              List<String> list = new ArrayList<String>();
             } 
        }
    ]]>
	</code-fragment>

	<test-code>
		<description>sets-ClassCastExceptionWithSubListToArrayListRule-ok.</description>
		<expected-problems>0</expected-problems>
		<code-ref id="sets-ok" />
	</test-code>
 
	<code-fragment id="sets-warn"><![CDATA[
  	  public class Foo {   
            private void method(long aLong) { 
               List<String> list = new ArrayList<String>();
               list.add("22");
               List<String> test = (ArrayList<String>) list.subList(0, 1);	   
             } 
        }
    ]]>
	</code-fragment>

	<test-code>
		<description>sets-ClassCastExceptionWithSubListToArrayListRule-warn.</description>
		<expected-problems>1</expected-problems>
		<expected-linenumbers>5</expected-linenumbers>
		<code-ref id="sets-warn" />
	</test-code>

</test-data>