public static List<SnapshotDescription> assertOneSnapshotThatMatches(Admin admin,
    String snapshotName, TableName tableName) throws IOException {
    // list the snapshot
    List<SnapshotDescription> snapshots = admin.listSnapshots();

    assertEquals("Should only have 1 snapshot", 1, snapshots.size());
    assertEquals(snapshotName, snapshots.get(0).getName());
    assertEquals(tableName, snapshots.get(0).getTableName());

    return snapshots;
  }
Make sure that there is only one snapshot returned from the master and its name and table match
the passed in parameters.
hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/SnapshotTestingUtils.java