public Annotator getAnnotator(AnnotationStyle style) {

        switch (style) {
            case JACKSON:
            case JACKSON2:
                return new Jackson2Annotator(generationConfig);
            case JSONB1:
                return new Jsonb1Annotator(generationConfig);
            case JSONB2:
                return new Jsonb2Annotator(generationConfig);
            case GSON:
                return new GsonAnnotator(generationConfig);
            case MOSHI1:
                return new Moshi1Annotator(generationConfig);
            case NONE:
                return new NoopAnnotator();
            default:
                throw new IllegalArgumentException("Unrecognised annotation style: " + style);
        }

    }
@Test
    public void canCreateCompositeAnnotator() {

        Annotator annotator1 = mock(Annotator.class);
        Annotator annotator2 = mock(Annotator.class);

        CompositeAnnotator composite = factory.getAnnotator(annotator1, annotator2);

        assertThat(composite.annotators.length, equalTo(2));
        assertThat(composite.annotators[0], is(equalTo(annotator1)));
        assertThat(composite.annotators[1], is(equalTo(annotator2)));

    }