@@ -0,0 +1,2505 @@
+package org.simpleframework.xml.core;%0D%0A%0D%0Aimport org.simpleframework.xml.Attribute;%0D%0Aimport org.simpleframework.xml.Default;%0D%0Aimport org.simpleframework.xml.DefaultType;%0D%0Aimport org.simpleframework.xml.Element;%0D%0Aimport org.simpleframework.xml.Root;%0D%0Aimport org.simpleframework.xml.ValidationTestCase;%0D%0A%0D%0Apublic class NotRequiredConstructorInjectionTest extends ValidationTestCase%7B%0D%0A   %0D%0A   private static final String SOURCE =%0D%0A   %22%3CexampleNotRequired value='value'/%3E%22;%0D%0A   %0D%0A   private static final String EXTRA =%0D%0A   %22%3CexampleNotRequired value='value'%3E%22+%0D%0A   %22  %3Cextra%3Eextra string%3C/extra%3E%22+%0D%0A   %22%3C/exampleNotRequired%3E%22;%0D%0A      %0D%0A   @Root%0D%0A   private static class ExampleNotRequired %7B%0D%0A      private final String name;%0D%0A      private final String value;%0D%0A      public ExampleNotRequired(@Element(name=%22name%22, required=false) String name, @Attribute(name=%22value%22) String value) %7B%0D%0A         this.name = name;%0D%0A         this.value = value;%0D%0A      %7D%0D%0A      @Attribute%0D%0A      public String getValue() %7B%0D%0A         return value;%0D%0A      %7D%0D%0A      @Element(required=false)%0D%0A      public String getName() %7B%0D%0A         return name;%0D%0A      %7D%0D%0A   %7D%0D%0A   %0D%0A   @Default(value=DefaultType.PROPERTY, required=false)%0D%0A   public static class ExampleNotRequiredByDefault extends ExampleNotRequired %7B%0D%0A      private final String extra;%0D%0A      public ExampleNotRequiredByDefault(@Element(name=%22name%22, required=false) String name, @Attribute(name=%22value%22) String value, @Element(name=%22extra%22, required=false) String extra) %7B%0D%0A         super(name, value);%0D%0A         this.extra = extra;%0D%0A      %7D%0D%0A      public String getExtra() %7B%0D%0A         return extra;%0D%0A      %7D%0D%0A   %7D%0D%0A   %0D%0A   public void s_testInjection() throws Exception %7B%0D%0A      ExampleNotRequired example = new Persister().read(ExampleNotRequired.class, SOURCE);%0D%0A      assertEquals(example.getName(), null);%0D%0A      assertEquals(example.getValue(), %22value%22);%0D%0A   %7D%0D%0A   %0D%0A   public void testInheritance() throws Exception %7B%0D%0A      ExampleNotRequiredByDefault example = new Persister().read(ExampleNotRequiredByDefault.class, SOURCE);%0D%0A      assertEquals(example.getName(), null);%0D%0A      assertEquals(example.getValue(), %22value%22);%0D%0A      assertEquals(example.getExtra(), null);%0D%0A      %0D%0A      ExampleNotRequiredByDefault exampleExtra = new Persister().read(ExampleNotRequiredByDefault.class, EXTRA);%0D%0A      assertEquals(exampleExtra.getName(), null);%0D%0A      assertEquals(exampleExtra.getValue(), %22value%22);%0D%0A      assertEquals(exampleExtra.getExtra(), %22extra string%22);%0D%0A   %7D%0D%0A%7D%0D%0A

Add test for non required constructor injection