@Test
public void testValidate() throws Exception {

    new Expectations() {
        {
            backupVerification.verifyBackup(
                    BackupVersion.SNAPSHOT_META_SERVICE,
                    anyBoolean,
                    new DateUtil.DateRange((Instant) any, (Instant) any));
            result = Optional.of(getBackupVerificationResult());
        }
    };
    Response response =
            resource.validateV2SnapshotByDate(
                    new DateUtil.DateRange(Instant.now(), Instant.now()).toString(), true);
    assertEquals(200, response.getStatus());
    assertEquals(
            GsonJsonSerializer.getGson().toJson(getBackupVerificationResult()),
            response.getEntity().toString());
}