### Question:
SpaceUtil { public static void wipe (Space sp, Object key) { while (sp.inp (key) != null) ; }  static Object[] inpAll(Space sp, Object key); static void wipe(Space sp, Object key); static void wipeAndOut(Space sp, Object key, Object value); static void wipeAndOut(Space sp, Object key, Object value, long timeout); static long nextLong(Space sp, Object key); static boolean outIfEmpty(Space sp, Object key, Object value, long nrdTimeout, long outTimeout); static void outWhenEmpty(Space sp, Object key, Object value, long timeout); static void outWhenEmpty(Space sp, Object key, Object value);  }### Answer:
@Test public void testWipe1() throws Throwable { SpaceUtil.wipe(SpaceFactory.getSpace(), ""); assertTrue(true, "Test completed without Exception"); }
@Test public void testWipeThrowsNullPointerException() throws Throwable { try { SpaceUtil.wipe(null, ""); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { if (isJavaVersionAtMost(JAVA_14)) { assertNull(ex.getMessage(), "ex.getMessage()"); } else { assertEquals("Cannot invoke \"org.jpos.space.Space.inp(Object)\" because \"sp\" is null", ex.getMessage(), "ex.getMessage()"); } } }