public static Foo newFoo(
            Integer[] someInt,
            String[] someString,
            Bar[] someBar,
            EnumSample[] someEnum,
            ByteString[] someBytes,
            Boolean[] someBoolean,
            Float[] someFloat,
            Double[] someDouble,
            Long[] someLong)
    {

        return new Foo(
                someInt == null ? null : Arrays.asList(someInt),
                someString == null ? null : Arrays.asList(someString),
                someBar == null ? null : Arrays.asList(someBar),
                someEnum == null ? null : Arrays.asList(someEnum),
                someBytes == null ? null : Arrays.asList(someBytes),
                someBoolean == null ? null : Arrays.asList(someBoolean),
                someFloat == null ? null : Arrays.asList(someFloat),
                someDouble == null ? null : Arrays.asList(someDouble),
                someLong == null ? null : Arrays.asList(someLong));
    }
The objects to be tested.

@author David Yu
@created Nov 13, 2009
protostuff-core/src/test/java/io/protostuff/SerializableObjects.java