@Test
public void shouldDeserializeParameterMetadataSectionFromJSON() throws ParamSerializationException {

    // given
    String json = "{ \"name\": \"parameter\", \"cacheable\": \"true\","
            + "\"nullable\": \"true\", \"inputLevels\": 1, \"levels\": ["
            + "{\"name\": \"level1\", \"levelCreator\": \"level1Creator\", \"type\": \"level1Type\", \"matcher\": \"level1Matcher\"},"
            + "{\"name\": \"level2\"}"
            + "]}";
    // when
    Parameter parameter = deserializer.deserialize(StringStreamUtil.reader(json));
    // then
    assertThat(parameter).hasName("parameter").isCacheable().isNullable().hasInputLevels(1).hasLevels(2)
            .level(0).hasName("level1").hasLevelCreator("level1Creator")
            .hasType("level1Type").hasMatcher("level1Matcher");
}