@Test
public void shouldSerializeParameterMetadataWithoutEntriesToJSON() {

    // given
    Level[] levels = new Level[]{
        level().withName("level1").build(),
        level().withName("level2").build()
    };
    ParameterEntry[] entries = new ParameterEntry[]{
        parameterEntry().withLevels("1").build()
    };
    Parameter parameter = parameter().withName("parameter").withInputLevels(3)
            .withLevels(levels).withEntries(entries)
            .build();
    StringWriter output = new StringWriter();
    // when
    serializer.serialize(parameter, output);
    output.flush();
    // then
    assertThat(output.toString()).isNotEmpty().contains("levels").contains("parameter")
            .doesNotContain("entries");
}