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

    List<SnapshotDescription> returnedSnapshots = new ArrayList<>();
    for (SnapshotDescription sd : snapshots) {
      if (snapshotName.equals(sd.getName()) && tableName.equals(sd.getTableName())) {
        returnedSnapshots.add(sd);
      }
    }

    Assert.assertTrue("No matching snapshots found.", returnedSnapshots.size() > 0);
    return returnedSnapshots;
  }
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