### Question:
SnapStream { public static StreamMode getStreamMode() { return streamMode; }  static CheckedInputStream getInputStream(File file); static CheckedOutputStream getOutputStream(File file, boolean fsync); static void sealStream(CheckedOutputStream os, OutputArchive oa); static boolean isValidSnapshot(File file); static void setStreamMode(StreamMode mode); static StreamMode getStreamMode(); static StreamMode getStreamMode(String fileName); static final String ZOOKEEPER_SHAPSHOT_STREAM_MODE; }### Answer:
@Test public void testGetStreamMode() { assertEquals(StreamMode.CHECKED, SnapStream.getStreamMode("snapshot.180000e3a2"), "expected to return un-compressed stream"); assertEquals(StreamMode.SNAPPY, SnapStream.getStreamMode("snapshot.180000e3a2.snappy"), "expected to return snappy stream"); assertEquals(StreamMode.GZIP, SnapStream.getStreamMode("snapshot.180000e3a2.gz"), "expected to return gzip stream"); }