### Question:
ConfigBuilder { @Nullable protected static Long getLongProperty(String name, Map<String, String> map) { try { return Long.parseLong(map.get(name)); } catch (NumberFormatException ex) { return null; } }  T readProperties(Properties properties); T readEnvironmentVariables(); T readSystemProperties();  }### Answer:
@Test void longProperty() { Long longProperty = ConfigBuilder.getLongProperty("long", Collections.singletonMap("long", "42343")); assertThat(longProperty).isEqualTo(42343); }
@Test void invalidLongProperty() { Long longProperty = ConfigBuilder.getLongProperty("long", Collections.singletonMap("long", "45.6")); assertThat(longProperty).isNull(); }
@Test void nullValue_LongProperty() { Long longProperty = ConfigBuilder.getLongProperty("long", Collections.emptyMap()); assertThat(longProperty).isNull(); }
@Test void testLongProperty() { Map<String, String> map = new HashMap<>(); map.put("int", "1"); map.put("long", "2L"); map.put("boolt", "true"); map.put("boolf", "false"); map.put("string", "random"); assertThat(ConfigBuilder.getLongProperty("int", map)).isNotNull(); assertThat(ConfigBuilder.getLongProperty("int", map)).isEqualTo(1); assertThat(ConfigBuilder.getLongProperty("long", map)).isNull(); assertThat(ConfigBuilder.getLongProperty("boolt", map)).isNull(); assertThat(ConfigBuilder.getLongProperty("boolf", map)).isNull(); assertThat(ConfigBuilder.getLongProperty("string", map)).isNull(); assertThat(ConfigBuilder.getLongProperty("no-key", map)).isNull(); }