### Question:
ChannelConfigImpl implements ChannelConfig, LogChannel { private static String timeToString(String timeUnit, int time) { return MessageFormat.format("{0,number,#}{1}", time, timeUnit); } ChannelConfigImpl(String id, DeviceConfigImpl deviceParent); @Override String getId(); @Override void setId(String id); @Override String getDescription(); @Override void setDescription(String description); @Override String getChannelAddress(); @Override void setChannelAddress(String address); @Override String getUnit(); @Override void setUnit(String unit); @Override ValueType getValueType(); @Override void setValueType(ValueType valueType); @Override Integer getValueTypeLength(); @Override void setValueTypeLength(Integer length); @Override Double getScalingFactor(); @Override void setScalingFactor(Double factor); @Override Double getValueOffset(); @Override void setValueOffset(Double offset); @Override Boolean isListening(); @Override void setListening(Boolean listening); @Override Integer getSamplingInterval(); @Override void setSamplingInterval(Integer samplingInterval); @Override Integer getSamplingTimeOffset(); @Override void setSamplingTimeOffset(Integer samplingTimeOffset); @Override String getSamplingGroup(); @Override void setSamplingGroup(String group); @Override Integer getLoggingInterval(); @Override void setLoggingInterval(Integer loggingInterval); @Override Integer getLoggingTimeOffset(); @Override void setLoggingTimeOffset(Integer loggingTimeOffset); @Override Boolean isDisabled(); @Override void setDisabled(Boolean disabled); @Override void delete(); @Override List<ServerMapping> getServerMappings(); @Override DeviceConfig getDevice(); boolean isSampling(); @Override void addServerMapping(ServerMapping serverMapping); @Override void deleteServerMappings(String id);  }### Answer:
@Test @Parameters({ "99ms, 99", "5ms, 5", "100ms, 100", "1s, 1000", "59s, 59000", "59001ms,59001", "1m, 60000", "0, 0", "5h, 18000000", "24h, 86400000" }) public void testTimeToString(String expectedTimeStr, int millis) throws Exception { String resTime = ChannelConfigImpl.millisToTimeString(millis); assertEquals(expectedTimeStr, resTime); }