### Question:
AbstractVerifier implements Verifier<T> { @Override public VerifyResult verify(ApplicationId appId, T input) { String name = getName(input); if (!EntityId.isValidId(name)) { return VerifyResult.failure(Err.NOT_AN_ID, name); } return VerifyResult.success(); }  @Override VerifyResult verify(ApplicationId appId, T input);  }### Answer:
@Test public void testId() throws Exception { AbstractVerifier<String> v = new AbstractVerifier<String>() { @Override protected String getName(String input) { return input; } }; ApplicationId appId = new ApplicationId("test", "some"); Assert.assertTrue(v.verify(appId, "foo").isSuccess()); Assert.assertTrue(v.verify(appId, "mydataset").isSuccess()); Assert.assertFalse(v.verify(appId, "foo name").isSuccess()); Assert.assertTrue(v.verify(appId, "foo-name").isSuccess()); Assert.assertTrue(v.verify(appId, "foo_name").isSuccess()); Assert.assertTrue(v.verify(appId, "foo1234").isSuccess()); Assert.assertFalse(v.verify(appId, "foo^ name").isSuccess()); Assert.assertFalse(v.verify(appId, "foo^name").isSuccess()); Assert.assertFalse(v.verify(appId, "foo/name").isSuccess()); Assert.assertFalse(v.verify(appId, "foo$name").isSuccess()); }