public static ModelType of(String name, String version) {
        validate(name, version);
        return Builder.create().name(name).version(version).build();
    }
@Test
    public void deserialize() {
        final ModelType modelType = ModelType.of("foobar", "1");
        final JsonNode jsonNode = objectMapper.convertValue(modelType, JsonNode.class);

        assertThat(jsonNode.isObject()).isTrue();
        assertThat(jsonNode.path("name").asText()).isEqualTo("foobar");
        assertThat(jsonNode.path("version").asText()).isEqualTo("1");
    }