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 canCreateCorrectAnnotatorFromAnnotationStyle() {

        assertThat(factory.getAnnotator(JACKSON), is(instanceOf(Jackson2Annotator.class)));
        assertThat(factory.getAnnotator(JACKSON2), is(instanceOf(Jackson2Annotator.class)));
        assertThat(factory.getAnnotator(GSON), is(instanceOf(GsonAnnotator.class)));
        assertThat(factory.getAnnotator(MOSHI1), is(instanceOf(Moshi1Annotator.class)));
        assertThat(factory.getAnnotator(NONE), is(instanceOf(NoopAnnotator.class)));

    }