protected SerializerFactory getSerializerFactory(boolean multipleClassLoader, boolean generic) {
        if (generic) {
            return multipleClassLoader ? new GenericMultipleClassLoaderSofaSerializerFactory() :
                new GenericSingleClassLoaderSofaSerializerFactory();
        } else {
            return multipleClassLoader ? new MultipleClassLoaderSofaSerializerFactory() :
                new SingleClassLoaderSofaSerializerFactory();
        }
    }
@Test
    public void getSerializerFactory() {
        Assert.assertEquals(SingleClassLoaderSofaSerializerFactory.class,
            serializer.getSerializerFactory(false, false).getClass());
        Assert.assertEquals(MultipleClassLoaderSofaSerializerFactory.class,
            serializer.getSerializerFactory(true, false).getClass());
        Assert.assertEquals(GenericSingleClassLoaderSofaSerializerFactory.class,
            serializer.getSerializerFactory(false, true).getClass());
        Assert.assertEquals(GenericMultipleClassLoaderSofaSerializerFactory.class,
            serializer.getSerializerFactory(true, true).getClass());
    }