@Test
public void testUpgradeToCollectorAddressOnlyPortEmpty() {

    List<String> lines = ImmutableList.of("before=test", "collector.host=localhost",
            "collector.port=", "after=test");
    List<String> newLines = PropertiesFiles.upgradeToCollectorAddressIfNeeded(lines);
    assertThat(newLines).containsExactly("before=test", "collector.address=localhost:8181",
            "after=test");
}