@@ -0,0 +1,1765 @@
+package com.github.dnault.therapi.core;%0A%0Aimport com.github.dnault.therapi.core.annotation.Remotable;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport java.util.Arrays;%0Aimport java.util.List;%0A%0Apublic class ReturnValueNotSlicedTest extends AbstractMethodRegistryTest %7B%0A%0A    @Before%0A    public void setup() %7B%0A        registry.scan(new SlicingServiceImpl());%0A    %7D%0A%0A    @Remotable(%22%22)%0A    @SuppressWarnings(%22unused%22)%0A    private interface SlicingService %7B%0A        Base get();%0A%0A        List%3CBase%3E list();%0A    %7D%0A%0A    private static class SlicingServiceImpl implements SlicingService %7B%0A        @Override%0A        public Base get() %7B%0A            return new Subclass(%22foo%22, %22bar%22);%0A        %7D%0A%0A        @Override%0A        public List%3CBase%3E list() %7B%0A            return Arrays.asList(new Subclass(%22foo%22, %22bar%22), new Subclass(%22baz%22, %22zot%22));%0A        %7D%0A    %7D%0A%0A    private static class Base %7B%0A        private final String base;%0A%0A        public Base(String base) %7B%0A            this.base = base;%0A        %7D%0A%0A        public String getBase() %7B%0A            return base;%0A        %7D%0A    %7D%0A%0A    private static class Subclass extends Base %7B%0A        private final String subclass;%0A%0A        public Subclass(String base, String subclass) %7B%0A            super(base);%0A            this.subclass = subclass;%0A        %7D%0A%0A        public String getSubclass() %7B%0A            return subclass;%0A        %7D%0A    %7D%0A%0A    @Test%0A    public void subclassPropertiesAreIncludedEvenThoughDeclaredReturnTypeIsBase() throws Exception %7B%0A        check(%22get%22, %22%5B%5D%22, %22%7Bbase:'foo',subclass:'bar'%7D%22);%0A    %7D%0A%0A    @Test%0A    public void subclassPropertiesAreIncludedInListEvenThoughDeclaredReturnTypeIsBase() throws Exception %7B%0A        check(%22list%22, %22%5B%5D%22, %22%5B%7Bbase:'foo',subclass:'bar'%7D,%7Bbase:'baz',subclass:'zot'%7D%5D%22);%0A    %7D%0A%7D%0A

Add unit test to make sure return values are not sliced