ObjectsUtils { public static void close(final Closeable closeable) { try { if (closeable != null) { closeable.close(); } } catch (IOException e) { logger.error("Unable to close stream.", e); } }  static boolean equals(Object object1, Object object2); static int hash(Object... objects); static T requireNonNull(T object, String errorMessage); static void close(final Closeable closeable);  }
@Test public void testStreamClosing() throws IOException { ObjectsUtils.close(input); verify(input).close(); }