### Question:
ConsistencyCheck { static void checkMetastorePath(Path path, int globDepth) { if (path.depth() != globDepth) { throw new IllegalStateException( "ABORTING: Metastore path structure looks wrong; depth != file system glob depth: '" + path + "'."); } } private  ConsistencyCheck();   }### Answer:
@Test void metastorePathCorrect() { ConsistencyCheck.checkMetastorePath(new Path("/db/table/snapshot/partition"), 4); }
@Test void metastorePathDepthIncorrect() { assertThatExceptionOfType(IllegalStateException.class) .isThrownBy(() -> ConsistencyCheck.checkMetastorePath( new Path("/db/snapshot/partition"), 4)); }