/*
 * The MIT License (MIT)
 *
 * Copyright (c) 2016 Thibault Meyer
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

import com.fasterxml.jackson.databind.node.ContainerNode;
import com.zero_x_baadf00d.partialize.Partialize;
import com.zero_x_baadf00d.partialize.annotation.PartialFields;
import org.junit.Assert;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runners.MethodSorters;

/**
 * StaticTest.
 *
 * @author Thibault Meyer
 * @version 16.01
 * @since 16.01
 */
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class StaticTest {

    /**
     * @since 16.01
     */
    @Test
    public void standardTest001() {
        final String fields = "buildDate";
        final Partialize partialize = new Partialize();
        final ContainerNode result = partialize.buildPartialObject(fields, StaticPojo.class);
        Assert.assertNotNull(result);
        Assert.assertTrue(result.has("buildDate"));
        Assert.assertEquals("2016-01-10", result.get("buildDate").asText());
    }

    /**
     * StaticPojo.
     *
     * @author Thibault Meyer
     * @version 16.10
     * @since 16.01
     */
    @PartialFields(allowedFields = "buildDate")
    public static class StaticPojo {

        public static String getBuildDate() {
            return "2016-01-10";
        }
    }
}

@@ -2062,270 +2062,1329 @@
   * 
-StaticPojo.%0A     *%0A     * @author Thibault Meyer%0A     * @version 16.10%0A     * @since 16.01%0A     */%0A    @PartialFields(allowedFields = %22buildDate%22)%0A    public static class StaticPojo %7B%0A%0A        public static String getBuildDate() %7B%0A            return %222016-01-10%22
+@since 16.01%0A     */%0A    @Test%0A    public void standardTest002() %7B%0A        final MixedPojo mixedPojo = new MixedPojo();%0A        final String fields = %22number,42%22;%0A        final Partialize partialize = new Partialize();%0A        final ContainerNode result = partialize.buildPartialObject(fields, MixedPojo.class, mixedPojo);%0A        Assert.assertNotNull(result);%0A        Assert.assertTrue(result.has(%22number%22));%0A        Assert.assertTrue(result.has(%2242%22));%0A        Assert.assertEquals(42, result.get(%22number%22).asInt());%0A        Assert.assertEquals(42, result.get(%2242%22).asInt());%0A    %7D%0A%0A    /**%0A     * StaticPojo.%0A     *%0A     * @author Thibault Meyer%0A     * @version 16.10%0A     * @since 16.01%0A     */%0A    @PartialFields(allowedFields = %22buildDate%22)%0A    public static class StaticPojo %7B%0A%0A        public static String getBuildDate() %7B%0A            return %222016-01-10%22;%0A        %7D%0A    %7D%0A%0A    /**%0A     * MixedPojo.%0A     *%0A     * @author Thibault Meyer%0A     * @version 16.01%0A     * @since 16.01%0A     */%0A    @PartialFields(allowedFields = %7B%22number%22, %2242%22%7D)%0A    public static class MixedPojo %7B%0A%0A        private final int number;%0A%0A        public MixedPojo() %7B%0A            this.number = 42;%0A        %7D%0A%0A        public static int get42() %7B%0A            return 42;%0A        %7D%0A%0A        public int getNumber() %7B%0A            return this.number
 ;%0A  

Add new unit test