### Question:
SimpleConfiguration implements Configuration, Serializable { public long getLong (String name) { return Long.parseLong(get(name, "0").trim()); } SimpleConfiguration();  SimpleConfiguration(Properties props);  SimpleConfiguration(String filename); String get(String name, String def); String[] getAll(String name); int[] getInts(String name); long[] getLongs(String name); double[] getDoubles(String name); boolean[] getBooleans(String name); String get(String name); int getInt(String name); int getInt(String name, int def); long getLong(String name); long getLong(String name, long def); double getDouble(String name); double getDouble(String name, double def); boolean getBoolean(String name); boolean getBoolean(String name, boolean def); void load(String filename); synchronized void put(String name, Object value); @Override Set<String> keySet(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void testGetLong() throws Throwable { long result = new SimpleConfiguration().getLong("testSimpleConfigurationName", 100L); assertEquals(100L, result, "result"); }
@Test public void testGetLong1() throws Throwable { long result = new SimpleConfiguration(new Properties()).getLong("testSimpleConfigurationName", 0L); assertEquals(0L, result, "result"); }
@Test public void testGetLong2() throws Throwable { long result = new SimpleConfiguration(new Properties()).getLong("testSimpleConfigurationName"); assertEquals(0L, result, "result"); }
@Test public void testGetLongThrowsNullPointerException() throws Throwable { try { new SimpleConfiguration(new Properties()).getLong(null, 100L); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { if (isJavaVersionAtMost(JAVA_14)) { assertNull(ex.getMessage(), "ex.getMessage()"); } else { assertEquals("Cannot invoke \"Object.hashCode()\" because \"key\" is null", ex.getMessage(), "ex.getMessage()"); } } }
@Test public void testGetLongThrowsNullPointerException1() throws Throwable { try { new SimpleConfiguration((Properties) null).getLong("testSimpleConfigurationName"); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { if (isJavaVersionAtMost(JAVA_14)) { assertNull(ex.getMessage(), "ex.getMessage()"); } else { assertEquals("Cannot invoke \"java.util.Properties.get(Object)\" because \"this.props\" is null", ex.getMessage(), "ex.getMessage()"); } } }