@Test public void shouldReturnNullWhenNoTypeRegisteredForLevelAndValueIsNull() { Parameter metadata = new SimpleParameter().withLevel(new SimpleLevel().withName("nullValue")); ParameterEntry entry = new SimpleParameterEntry((String) null); MapEntry map = converter.asMap(metadata, entry); assertThat(map.get("nullValue")).isNull(); }
MapEntry asMap(Parameter metadata, ParameterEntry parameterEntry) { MapEntry map = new MapEntry(parameterEntry.getKey()); int index = 0; for (Level level : metadata.getLevels()) { map.put(level.getName(), asObject(level, parameterEntry.getLevels()[index])); index++; } return map; }
EntryToMapConverter { MapEntry asMap(Parameter metadata, ParameterEntry parameterEntry) { MapEntry map = new MapEntry(parameterEntry.getKey()); int index = 0; for (Level level : metadata.getLevels()) { map.put(level.getName(), asObject(level, parameterEntry.getLevels()[index])); index++; } return map; } }
EntryToMapConverter { MapEntry asMap(Parameter metadata, ParameterEntry parameterEntry) { MapEntry map = new MapEntry(parameterEntry.getKey()); int index = 0; for (Level level : metadata.getLevels()) { map.put(level.getName(), asObject(level, parameterEntry.getLevels()[index])); index++; } return map; } EntryToMapConverter(ParamEngineRuntimeConfig engineConfig); }
EntryToMapConverter { MapEntry asMap(Parameter metadata, ParameterEntry parameterEntry) { MapEntry map = new MapEntry(parameterEntry.getKey()); int index = 0; for (Level level : metadata.getLevels()) { map.put(level.getName(), asObject(level, parameterEntry.getLevels()[index])); index++; } return map; } EntryToMapConverter(ParamEngineRuntimeConfig engineConfig);  }
EntryToMapConverter { MapEntry asMap(Parameter metadata, ParameterEntry parameterEntry) { MapEntry map = new MapEntry(parameterEntry.getKey()); int index = 0; for (Level level : metadata.getLevels()) { map.put(level.getName(), asObject(level, parameterEntry.getLevels()[index])); index++; } return map; } EntryToMapConverter(ParamEngineRuntimeConfig engineConfig);   }