diff --git a/java/google/registry/keyring/kms/KmsUpdater.java b/java/google/registry/keyring/kms/KmsUpdater.java
index 1532b6d76..6a0bc6930 100644
--- a/java/google/registry/keyring/kms/KmsUpdater.java
+++ b/java/google/registry/keyring/kms/KmsUpdater.java
@@ -127,7 +127,7 @@ public final class KmsUpdater {
*
The operations in this method are organized so that existing {@link KmsSecretRevision}
* entities remain primary and decryptable if a failure occurs.
*/
- public void update() throws IOException {
+ public void update() {
checkState(!secretValues.isEmpty(), "At least one Keyring value must be persisted");
persistEncryptedValues(encryptValues(secretValues));
@@ -139,8 +139,7 @@ public final class KmsUpdater {
*
* @see google.registry.config.RegistryConfigSettings#kms
*/
- private ImmutableMap encryptValues(Map keyValues)
- throws IOException {
+ private ImmutableMap encryptValues(Map keyValues) {
ImmutableMap.Builder encryptedValues = new ImmutableMap.Builder<>();
for (Map.Entry entry : keyValues.entrySet()) {
String secretName = entry.getKey();
diff --git a/java/google/registry/tools/CreateOrUpdateTldCommand.java b/java/google/registry/tools/CreateOrUpdateTldCommand.java
index caf73673a..ae80623ed 100644
--- a/java/google/registry/tools/CreateOrUpdateTldCommand.java
+++ b/java/google/registry/tools/CreateOrUpdateTldCommand.java
@@ -272,7 +272,7 @@ abstract class CreateOrUpdateTldCommand extends MutatingCommand {
protected abstract void initTldCommand();
@Override
- protected final void init() throws Exception {
+ protected final void init() {
assertAllowedEnvironment();
initTldCommand();
String duplicates = Joiner.on(", ").join(findDuplicates(mainParameters));
diff --git a/java/google/registry/tools/LoadSnapshotCommand.java b/java/google/registry/tools/LoadSnapshotCommand.java
index c5dc8bef7..c4806d52f 100644
--- a/java/google/registry/tools/LoadSnapshotCommand.java
+++ b/java/google/registry/tools/LoadSnapshotCommand.java
@@ -66,8 +66,7 @@ final class LoadSnapshotCommand extends BigqueryCommand {
* Starts load jobs for the given snapshot kinds, and returns a map of kind name to
* ListenableFuture representing the result of the load job for that kind.
*/
- private Map> loadSnapshotKinds(List kindNames)
- throws Exception {
+ private Map> loadSnapshotKinds(List kindNames) {
ImmutableMap.Builder> builder = new ImmutableMap.Builder<>();
for (String kind : kindNames) {
String filename = String.format(
@@ -79,7 +78,7 @@ final class LoadSnapshotCommand extends BigqueryCommand {
}
/** Starts a load job for the specified kind name, sourcing data from the given GCS file. */
- private ListenableFuture> loadSnapshotFile(String filename, String kindName) throws Exception {
+ private ListenableFuture> loadSnapshotFile(String filename, String kindName) {
return bigquery().load(
bigquery().buildDestinationTable(kindName)
.description("Datastore snapshot import for " + kindName + ".")
diff --git a/java/google/registry/util/TeeOutputStream.java b/java/google/registry/util/TeeOutputStream.java
index aa96fae93..ce6d8d96a 100644
--- a/java/google/registry/util/TeeOutputStream.java
+++ b/java/google/registry/util/TeeOutputStream.java
@@ -61,7 +61,7 @@ public final class TeeOutputStream extends OutputStream {
/** Closes the stream. Any calls to a {@code write()} method after this will throw. */
@Override
- public void close() throws IOException {
+ public void close() {
isClosed = true;
}
}
diff --git a/javatests/google/registry/backup/CommitLogCheckpointActionTest.java b/javatests/google/registry/backup/CommitLogCheckpointActionTest.java
index 67d179080..a93463b66 100644
--- a/javatests/google/registry/backup/CommitLogCheckpointActionTest.java
+++ b/javatests/google/registry/backup/CommitLogCheckpointActionTest.java
@@ -68,7 +68,7 @@ public class CommitLogCheckpointActionTest {
}
@Test
- public void testRun_noCheckpointEverWritten_writesCheckpointAndEnqueuesTask() throws Exception {
+ public void testRun_noCheckpointEverWritten_writesCheckpointAndEnqueuesTask() {
task.run();
assertTasksEnqueued(
QUEUE_NAME,
@@ -80,8 +80,7 @@ public class CommitLogCheckpointActionTest {
}
@Test
- public void testRun_checkpointWrittenBeforeNow_writesCheckpointAndEnqueuesTask()
- throws Exception {
+ public void testRun_checkpointWrittenBeforeNow_writesCheckpointAndEnqueuesTask() {
DateTime oneMinuteAgo = now.minusMinutes(1);
persistResource(CommitLogCheckpointRoot.create(oneMinuteAgo));
task.run();
@@ -95,7 +94,7 @@ public class CommitLogCheckpointActionTest {
}
@Test
- public void testRun_checkpointWrittenAfterNow_doesntOverwrite_orEnqueueTask() throws Exception {
+ public void testRun_checkpointWrittenAfterNow_doesntOverwrite_orEnqueueTask() {
DateTime oneMinuteFromNow = now.plusMinutes(1);
persistResource(CommitLogCheckpointRoot.create(oneMinuteFromNow));
task.run();
diff --git a/javatests/google/registry/cron/CommitLogFanoutActionTest.java b/javatests/google/registry/cron/CommitLogFanoutActionTest.java
index 3c4d85fe1..78802cf83 100644
--- a/javatests/google/registry/cron/CommitLogFanoutActionTest.java
+++ b/javatests/google/registry/cron/CommitLogFanoutActionTest.java
@@ -52,7 +52,7 @@ public class CommitLogFanoutActionTest {
.build();
@Test
- public void testSuccess() throws Exception {
+ public void testSuccess() {
CommitLogFanoutAction action = new CommitLogFanoutAction();
action.taskQueueUtils = new TaskQueueUtils(new Retrier(null, 1));
action.endpoint = ENDPOINT;
diff --git a/javatests/google/registry/cron/TldFanoutActionTest.java b/javatests/google/registry/cron/TldFanoutActionTest.java
index 479eef54a..ec789ad3a 100644
--- a/javatests/google/registry/cron/TldFanoutActionTest.java
+++ b/javatests/google/registry/cron/TldFanoutActionTest.java
@@ -99,7 +99,7 @@ public class TldFanoutActionTest {
persistResource(Registry.get("example").asBuilder().setTldType(TldType.TEST).build());
}
- private static void assertTasks(String... tasks) throws Exception {
+ private static void assertTasks(String... tasks) {
assertTasksEnqueued(
QUEUE,
Stream.of(tasks).map(
@@ -111,7 +111,7 @@ public class TldFanoutActionTest {
.collect(toImmutableList()));
}
- private static void assertTaskWithoutTld() throws Exception {
+ private static void assertTaskWithoutTld() {
assertTasksEnqueued(
QUEUE,
new TaskMatcher()
@@ -120,7 +120,7 @@ public class TldFanoutActionTest {
}
@Test
- public void testSuccess_methodPostIsDefault() throws Exception {
+ public void testSuccess_methodPostIsDefault() {
run(getParamsMap("runInEmpty", ""));
assertTasksEnqueued(QUEUE, new TaskMatcher().method("POST"));
}
@@ -131,25 +131,25 @@ public class TldFanoutActionTest {
}
@Test
- public void testSuccess_runInEmpty() throws Exception {
+ public void testSuccess_runInEmpty() {
run(getParamsMap("runInEmpty", ""));
assertTaskWithoutTld();
}
@Test
- public void testSuccess_forEachRealTld() throws Exception {
+ public void testSuccess_forEachRealTld() {
run(getParamsMap("forEachRealTld", ""));
assertTasks("com", "net", "org");
}
@Test
- public void testSuccess_forEachTestTld() throws Exception {
+ public void testSuccess_forEachTestTld() {
run(getParamsMap("forEachTestTld", ""));
assertTasks("example");
}
@Test
- public void testSuccess_forEachTestTldAndForEachRealTld() throws Exception {
+ public void testSuccess_forEachTestTldAndForEachRealTld() {
run(getParamsMap(
"forEachTestTld", "",
"forEachRealTld", ""));
@@ -157,13 +157,13 @@ public class TldFanoutActionTest {
}
@Test
- public void testSuccess_runEverywhere() throws Exception {
+ public void testSuccess_runEverywhere() {
run(getParamsMap("forEachTestTld", "", "forEachRealTld", ""));
assertTasks("com", "net", "org", "example");
}
@Test
- public void testSuccess_excludeRealTlds() throws Exception {
+ public void testSuccess_excludeRealTlds() {
run(getParamsMap(
"forEachRealTld", "",
"exclude", "com,net"));
@@ -171,7 +171,7 @@ public class TldFanoutActionTest {
}
@Test
- public void testSuccess_excludeTestTlds() throws Exception {
+ public void testSuccess_excludeTestTlds() {
run(getParamsMap(
"forEachTestTld", "",
"exclude", "example"));
@@ -179,7 +179,7 @@ public class TldFanoutActionTest {
}
@Test
- public void testSuccess_excludeNonexistentTlds() throws Exception {
+ public void testSuccess_excludeNonexistentTlds() {
run(getParamsMap(
"forEachTestTld", "",
"forEachRealTld", "",
@@ -221,14 +221,14 @@ public class TldFanoutActionTest {
}
@Test
- public void testSuccess_additionalArgsFlowThroughToPostParams() throws Exception {
+ public void testSuccess_additionalArgsFlowThroughToPostParams() {
run(getParamsMap("forEachTestTld", "", "newkey", "newval"));
assertTasksEnqueued(QUEUE,
new TaskMatcher().url("/the/servlet").param("newkey", "newval"));
}
@Test
- public void testSuccess_returnHttpResponse() throws Exception {
+ public void testSuccess_returnHttpResponse() {
run(getParamsMap("forEachRealTld", "", "endpoint", "/the/servlet"));
List taskList =
@@ -247,7 +247,7 @@ public class TldFanoutActionTest {
}
@Test
- public void testSuccess_returnHttpResponse_runInEmpty() throws Exception {
+ public void testSuccess_returnHttpResponse_runInEmpty() {
run(getParamsMap("runInEmpty", "", "endpoint", "/the/servlet"));
List taskList =
diff --git a/javatests/google/registry/dns/DnsInjectionTest.java b/javatests/google/registry/dns/DnsInjectionTest.java
index e2f4c689c..5371e56cc 100644
--- a/javatests/google/registry/dns/DnsInjectionTest.java
+++ b/javatests/google/registry/dns/DnsInjectionTest.java
@@ -73,7 +73,7 @@ public final class DnsInjectionTest {
}
@Test
- public void testReadDnsQueueAction_injectsAndWorks() throws Exception {
+ public void testReadDnsQueueAction_injectsAndWorks() {
persistActiveSubordinateHost("ns1.example.lol", persistActiveDomain("example.lol"));
clock.advanceOneMilli();
dnsQueue.addDomainRefreshTask("example.lol");
@@ -83,7 +83,7 @@ public final class DnsInjectionTest {
}
@Test
- public void testRefreshDns_domain_injectsAndWorks() throws Exception {
+ public void testRefreshDns_domain_injectsAndWorks() {
persistActiveDomain("example.lol");
when(req.getParameter("type")).thenReturn("domain");
when(req.getParameter("name")).thenReturn("example.lol");
@@ -101,7 +101,7 @@ public final class DnsInjectionTest {
}
@Test
- public void testRefreshDns_host_injectsAndWorks() throws Exception {
+ public void testRefreshDns_host_injectsAndWorks() {
persistActiveSubordinateHost("ns1.example.lol", persistActiveDomain("example.lol"));
when(req.getParameter("type")).thenReturn("host");
when(req.getParameter("name")).thenReturn("ns1.example.lol");
diff --git a/javatests/google/registry/dns/DnsQueueTest.java b/javatests/google/registry/dns/DnsQueueTest.java
index c6fef8c56..e855d75f8 100644
--- a/javatests/google/registry/dns/DnsQueueTest.java
+++ b/javatests/google/registry/dns/DnsQueueTest.java
@@ -49,7 +49,7 @@ public class DnsQueueTest {
}
@Test
- public void test_addHostRefreshTask_success() throws Exception {
+ public void test_addHostRefreshTask_success() {
createTld("tld");
dnsQueue.addHostRefreshTask("octopus.tld");
assertTasksEnqueued(
@@ -79,7 +79,7 @@ public class DnsQueueTest {
}
@Test
- public void test_addDomainRefreshTask_success() throws Exception {
+ public void test_addDomainRefreshTask_success() {
createTld("tld");
dnsQueue.addDomainRefreshTask("octopus.tld");
assertTasksEnqueued(
diff --git a/javatests/google/registry/dns/PublishDnsUpdatesActionTest.java b/javatests/google/registry/dns/PublishDnsUpdatesActionTest.java
index b99e5978c..00ef25b35 100644
--- a/javatests/google/registry/dns/PublishDnsUpdatesActionTest.java
+++ b/javatests/google/registry/dns/PublishDnsUpdatesActionTest.java
@@ -106,7 +106,7 @@ public class PublishDnsUpdatesActionTest {
}
@Test
- public void testHost_published() throws Exception {
+ public void testHost_published() {
action = createAction("xn--q9jyb4c");
action.hosts = ImmutableSet.of("ns1.example.xn--q9jyb4c");
@@ -132,7 +132,7 @@ public class PublishDnsUpdatesActionTest {
}
@Test
- public void testDomain_published() throws Exception {
+ public void testDomain_published() {
action = createAction("xn--q9jyb4c");
action.domains = ImmutableSet.of("example.xn--q9jyb4c");
@@ -158,7 +158,7 @@ public class PublishDnsUpdatesActionTest {
}
@Test
- public void testAction_acquiresCorrectLock() throws Exception {
+ public void testAction_acquiresCorrectLock() {
persistResource(Registry.get("xn--q9jyb4c").asBuilder().setNumDnsPublishLocks(4).build());
action = createAction("xn--q9jyb4c");
action.lockIndex = 2;
@@ -176,7 +176,7 @@ public class PublishDnsUpdatesActionTest {
}
@Test
- public void testPublish_commitFails() throws Exception {
+ public void testPublish_commitFails() {
action = createAction("xn--q9jyb4c");
action.domains = ImmutableSet.of("example.xn--q9jyb4c", "example2.xn--q9jyb4c");
action.hosts =
@@ -203,7 +203,7 @@ public class PublishDnsUpdatesActionTest {
}
@Test
- public void testHostAndDomain_published() throws Exception {
+ public void testHostAndDomain_published() {
action = createAction("xn--q9jyb4c");
action.domains = ImmutableSet.of("example.xn--q9jyb4c", "example2.xn--q9jyb4c");
action.hosts = ImmutableSet.of(
@@ -235,7 +235,7 @@ public class PublishDnsUpdatesActionTest {
}
@Test
- public void testWrongTld_notPublished() throws Exception {
+ public void testWrongTld_notPublished() {
action = createAction("xn--q9jyb4c");
action.domains = ImmutableSet.of("example.com", "example2.com");
action.hosts = ImmutableSet.of("ns1.example.com", "ns2.example.com", "ns1.example2.com");
@@ -261,7 +261,7 @@ public class PublishDnsUpdatesActionTest {
}
@Test
- public void testLockIsntAvailable() throws Exception {
+ public void testLockIsntAvailable() {
action = createAction("xn--q9jyb4c");
action.domains = ImmutableSet.of("example.com", "example2.com");
action.hosts = ImmutableSet.of("ns1.example.com", "ns2.example.com", "ns1.example2.com");
@@ -284,7 +284,7 @@ public class PublishDnsUpdatesActionTest {
}
@Test
- public void testParam_invalidLockIndex() throws Exception {
+ public void testParam_invalidLockIndex() {
persistResource(Registry.get("xn--q9jyb4c").asBuilder().setNumDnsPublishLocks(4).build());
action = createAction("xn--q9jyb4c");
action.domains = ImmutableSet.of("example.com");
@@ -309,7 +309,7 @@ public class PublishDnsUpdatesActionTest {
}
@Test
- public void testRegistryParam_mismatchedMaxLocks() throws Exception {
+ public void testRegistryParam_mismatchedMaxLocks() {
persistResource(Registry.get("xn--q9jyb4c").asBuilder().setNumDnsPublishLocks(4).build());
action = createAction("xn--q9jyb4c");
action.domains = ImmutableSet.of("example.com");
@@ -334,7 +334,7 @@ public class PublishDnsUpdatesActionTest {
}
@Test
- public void testWrongDnsWriter() throws Exception {
+ public void testWrongDnsWriter() {
action = createAction("xn--q9jyb4c");
action.domains = ImmutableSet.of("example.com", "example2.com");
action.hosts = ImmutableSet.of("ns1.example.com", "ns2.example.com", "ns1.example2.com");
diff --git a/javatests/google/registry/dns/ReadDnsQueueActionTest.java b/javatests/google/registry/dns/ReadDnsQueueActionTest.java
index 52116fbe1..34c9b6981 100644
--- a/javatests/google/registry/dns/ReadDnsQueueActionTest.java
+++ b/javatests/google/registry/dns/ReadDnsQueueActionTest.java
@@ -147,8 +147,7 @@ public class ReadDnsQueueActionTest {
.param(DNS_TARGET_TYPE_PARAM, TargetType.DOMAIN.toString());
}
- private void assertTldsEnqueuedInPushQueue(ImmutableMultimap tldsToDnsWriters)
- throws Exception {
+ private void assertTldsEnqueuedInPushQueue(ImmutableMultimap tldsToDnsWriters) {
// By default, the publishDnsUpdates tasks will be enqueued one hour after the update items were
// created in the pull queue. This is because of the clock.advanceBy in run()
assertTasksEnqueued(
@@ -169,7 +168,7 @@ public class ReadDnsQueueActionTest {
}
@Test
- public void testSuccess_methodPostIsDefault() throws Exception {
+ public void testSuccess_methodPostIsDefault() {
dnsQueue.addDomainRefreshTask("domain.com");
dnsQueue.addDomainRefreshTask("domain.net");
dnsQueue.addDomainRefreshTask("domain.example");
@@ -185,7 +184,7 @@ public class ReadDnsQueueActionTest {
}
@Test
- public void testSuccess_allSingleLockTlds() throws Exception {
+ public void testSuccess_allSingleLockTlds() {
dnsQueue.addDomainRefreshTask("domain.com");
dnsQueue.addDomainRefreshTask("domain.net");
dnsQueue.addDomainRefreshTask("domain.example");
@@ -198,7 +197,7 @@ public class ReadDnsQueueActionTest {
}
@Test
- public void testSuccess_moreUpdatesThanQueueBatchSize() throws Exception {
+ public void testSuccess_moreUpdatesThanQueueBatchSize() {
// The task queue has a batch size of 1000 (that's the maximum number of items you can lease at
// once).
ImmutableList domains =
@@ -225,7 +224,7 @@ public class ReadDnsQueueActionTest {
}
@Test
- public void testSuccess_twoDnsWriters() throws Exception {
+ public void testSuccess_twoDnsWriters() {
persistResource(
Registry.get("com")
.asBuilder()
@@ -240,7 +239,7 @@ public class ReadDnsQueueActionTest {
}
@Test
- public void testSuccess_differentUpdateTimes_usesMinimum() throws Exception {
+ public void testSuccess_differentUpdateTimes_usesMinimum() {
clock.setTo(DateTime.parse("3000-02-03TZ"));
dnsQueue.addDomainRefreshTask("domain1.com");
clock.setTo(DateTime.parse("3000-02-04TZ"));
@@ -265,7 +264,7 @@ public class ReadDnsQueueActionTest {
}
@Test
- public void testSuccess_oneTldPaused_returnedToQueue() throws Exception {
+ public void testSuccess_oneTldPaused_returnedToQueue() {
persistResource(Registry.get("net").asBuilder().setDnsPaused(true).build());
dnsQueue.addDomainRefreshTask("domain.com");
dnsQueue.addDomainRefreshTask("domain.net");
@@ -279,7 +278,7 @@ public class ReadDnsQueueActionTest {
}
@Test
- public void testSuccess_oneTldUnknown_returnedToQueue() throws Exception {
+ public void testSuccess_oneTldUnknown_returnedToQueue() {
dnsQueue.addDomainRefreshTask("domain.com");
dnsQueue.addDomainRefreshTask("domain.example");
QueueFactory.getQueue(DNS_PULL_QUEUE_NAME)
@@ -299,7 +298,7 @@ public class ReadDnsQueueActionTest {
}
@Test
- public void testSuccess_corruptTaskTldMismatch_published() throws Exception {
+ public void testSuccess_corruptTaskTldMismatch_published() {
// TODO(mcilwain): what's the correct action to take in this case?
dnsQueue.addDomainRefreshTask("domain.com");
dnsQueue.addDomainRefreshTask("domain.example");
@@ -320,7 +319,7 @@ public class ReadDnsQueueActionTest {
}
@Test
- public void testSuccess_corruptTaskNoTld_discarded() throws Exception {
+ public void testSuccess_corruptTaskNoTld_discarded() {
dnsQueue.addDomainRefreshTask("domain.com");
dnsQueue.addDomainRefreshTask("domain.example");
QueueFactory.getQueue(DNS_PULL_QUEUE_NAME)
@@ -339,7 +338,7 @@ public class ReadDnsQueueActionTest {
}
@Test
- public void testSuccess_corruptTaskNoName_discarded() throws Exception {
+ public void testSuccess_corruptTaskNoName_discarded() {
dnsQueue.addDomainRefreshTask("domain.com");
dnsQueue.addDomainRefreshTask("domain.example");
QueueFactory.getQueue(DNS_PULL_QUEUE_NAME)
@@ -358,7 +357,7 @@ public class ReadDnsQueueActionTest {
}
@Test
- public void testSuccess_corruptTaskNoType_discarded() throws Exception {
+ public void testSuccess_corruptTaskNoType_discarded() {
dnsQueue.addDomainRefreshTask("domain.com");
dnsQueue.addDomainRefreshTask("domain.example");
QueueFactory.getQueue(DNS_PULL_QUEUE_NAME)
@@ -377,7 +376,7 @@ public class ReadDnsQueueActionTest {
}
@Test
- public void testSuccess_corruptTaskWrongType_discarded() throws Exception {
+ public void testSuccess_corruptTaskWrongType_discarded() {
dnsQueue.addDomainRefreshTask("domain.com");
dnsQueue.addDomainRefreshTask("domain.example");
QueueFactory.getQueue(DNS_PULL_QUEUE_NAME)
@@ -397,7 +396,7 @@ public class ReadDnsQueueActionTest {
}
@Test
- public void testSuccess_zone_getsIgnored() throws Exception {
+ public void testSuccess_zone_getsIgnored() {
dnsQueue.addHostRefreshTask("ns1.domain.com");
dnsQueue.addDomainRefreshTask("domain.net");
dnsQueue.addZoneRefreshTask("example");
@@ -418,7 +417,7 @@ public class ReadDnsQueueActionTest {
}
@Test
- public void testSuccess_manyDomainsAndHosts() throws Exception {
+ public void testSuccess_manyDomainsAndHosts() {
for (int i = 0; i < 150; i++) {
// 0: domain; 1: host 1; 2: host 2
for (int thingType = 0; thingType < 3; thingType++) {
@@ -489,7 +488,7 @@ public class ReadDnsQueueActionTest {
}
@Test
- public void testSuccess_lockGroupsHostBySuperordinateDomain() throws Exception {
+ public void testSuccess_lockGroupsHostBySuperordinateDomain() {
dnsQueue.addDomainRefreshTask("hello.multilock.uk");
dnsQueue.addHostRefreshTask("ns1.abc.hello.multilock.uk");
dnsQueue.addHostRefreshTask("ns2.hello.multilock.uk");
diff --git a/javatests/google/registry/dns/writer/clouddns/CloudDnsWriterTest.java b/javatests/google/registry/dns/writer/clouddns/CloudDnsWriterTest.java
index 0f40bcf5d..5f15eccb1 100644
--- a/javatests/google/registry/dns/writer/clouddns/CloudDnsWriterTest.java
+++ b/javatests/google/registry/dns/writer/clouddns/CloudDnsWriterTest.java
@@ -310,14 +310,14 @@ public class CloudDnsWriterTest {
}
@Test
- public void testLoadDomain_nonExistentDomain() throws Exception {
+ public void testLoadDomain_nonExistentDomain() {
writer.publishDomain("example.tld");
verifyZone(ImmutableSet.of());
}
@Test
- public void testLoadDomain_noDsDataOrNameservers() throws Exception {
+ public void testLoadDomain_noDsDataOrNameservers() {
persistResource(fakeDomain("example.tld", ImmutableSet.of(), 0));
writer.publishDomain("example.tld");
@@ -325,7 +325,7 @@ public class CloudDnsWriterTest {
}
@Test
- public void testLoadDomain_deleteOldData() throws Exception {
+ public void testLoadDomain_deleteOldData() {
stubZone = fakeDomainRecords("example.tld", 2, 2, 2, 2);
persistResource(fakeDomain("example.tld", ImmutableSet.of(), 0));
writer.publishDomain("example.tld");
@@ -334,7 +334,7 @@ public class CloudDnsWriterTest {
}
@Test
- public void testLoadDomain_withExternalNs() throws Exception {
+ public void testLoadDomain_withExternalNs() {
persistResource(
fakeDomain("example.tld", ImmutableSet.of(persistResource(fakeHost("0.external"))), 0));
writer.publishDomain("example.tld");
@@ -343,7 +343,7 @@ public class CloudDnsWriterTest {
}
@Test
- public void testLoadDomain_withDsData() throws Exception {
+ public void testLoadDomain_withDsData() {
persistResource(
fakeDomain("example.tld", ImmutableSet.of(persistResource(fakeHost("0.external"))), 1));
writer.publishDomain("example.tld");
@@ -352,7 +352,7 @@ public class CloudDnsWriterTest {
}
@Test
- public void testLoadDomain_withInBailiwickNs_IPv4() throws Exception {
+ public void testLoadDomain_withInBailiwickNs_IPv4() {
persistResource(
fakeDomain(
"example.tld",
@@ -367,7 +367,7 @@ public class CloudDnsWriterTest {
}
@Test
- public void testLoadDomain_withInBailiwickNs_IPv6() throws Exception {
+ public void testLoadDomain_withInBailiwickNs_IPv6() {
persistResource(
fakeDomain(
"example.tld",
@@ -382,7 +382,7 @@ public class CloudDnsWriterTest {
}
@Test
- public void testLoadDomain_withNameserveThatEndsWithDomainName() throws Exception {
+ public void testLoadDomain_withNameserveThatEndsWithDomainName() {
persistResource(
fakeDomain(
"example.tld",
@@ -394,7 +394,7 @@ public class CloudDnsWriterTest {
}
@Test
- public void testLoadHost_externalHost() throws Exception {
+ public void testLoadHost_externalHost() {
writer.publishHost("ns1.example.com");
// external hosts should not be published in our zone
@@ -402,7 +402,7 @@ public class CloudDnsWriterTest {
}
@Test
- public void testLoadHost_removeStaleNsRecords() throws Exception {
+ public void testLoadHost_removeStaleNsRecords() {
// Initialize the zone with both NS records
stubZone = fakeDomainRecords("example.tld", 2, 0, 0, 0);
@@ -435,7 +435,7 @@ public class CloudDnsWriterTest {
}
@Test
- public void testLoadDomain_withClientHold() throws Exception {
+ public void testLoadDomain_withClientHold() {
persistResource(
fakeDomain(
"example.tld",
@@ -450,7 +450,7 @@ public class CloudDnsWriterTest {
}
@Test
- public void testLoadDomain_withServerHold() throws Exception {
+ public void testLoadDomain_withServerHold() {
persistResource(
fakeDomain(
"example.tld",
@@ -466,7 +466,7 @@ public class CloudDnsWriterTest {
}
@Test
- public void testLoadDomain_withPendingDelete() throws Exception {
+ public void testLoadDomain_withPendingDelete() {
persistResource(
fakeDomain(
"example.tld",
@@ -481,7 +481,7 @@ public class CloudDnsWriterTest {
}
@Test
- public void testDuplicateRecords() throws Exception {
+ public void testDuplicateRecords() {
// In publishing DNS records, we can end up publishing information on the same host twice
// (through a domain change and a host change), so this scenario needs to work.
persistResource(
diff --git a/javatests/google/registry/export/BigqueryPollJobActionTest.java b/javatests/google/registry/export/BigqueryPollJobActionTest.java
index 43355eb98..2b6bb1562 100644
--- a/javatests/google/registry/export/BigqueryPollJobActionTest.java
+++ b/javatests/google/registry/export/BigqueryPollJobActionTest.java
@@ -102,7 +102,7 @@ public class BigqueryPollJobActionTest {
}
@Test
- public void testSuccess_enqueuePollTask() throws Exception {
+ public void testSuccess_enqueuePollTask() {
new BigqueryPollJobEnqueuer(TASK_QUEUE_UTILS).enqueuePollTask(
new JobReference().setProjectId(PROJECT_ID).setJobId(JOB_ID));
assertTasksEnqueued(BigqueryPollJobAction.QUEUE, newPollJobTaskMatcher("GET"));
diff --git a/javatests/google/registry/export/CheckSnapshotActionTest.java b/javatests/google/registry/export/CheckSnapshotActionTest.java
index ef89939fc..e61a2f5e5 100644
--- a/javatests/google/registry/export/CheckSnapshotActionTest.java
+++ b/javatests/google/registry/export/CheckSnapshotActionTest.java
@@ -93,8 +93,7 @@ public class CheckSnapshotActionTest {
when(backupService.findByName("some_backup")).thenReturn(backupInfo);
}
- private static void assertLoadTaskEnqueued(String id, String file, String kinds)
- throws Exception {
+ private static void assertLoadTaskEnqueued(String id, String file, String kinds) {
assertTasksEnqueued(
"export-snapshot",
new TaskMatcher()
@@ -106,7 +105,7 @@ public class CheckSnapshotActionTest {
}
@Test
- public void testSuccess_enqueuePollTask() throws Exception {
+ public void testSuccess_enqueuePollTask() {
CheckSnapshotAction.enqueuePollTask(
"some_snapshot_name", ImmutableSet.of("one", "two", "three"));
assertTasksEnqueued(
@@ -147,7 +146,7 @@ public class CheckSnapshotActionTest {
}
@Test
- public void testPost_forCompleteBackup_enqueuesLoadTask() throws Exception {
+ public void testPost_forCompleteBackup_enqueuesLoadTask() {
action.run();
assertLoadTaskEnqueued(
@@ -155,7 +154,7 @@ public class CheckSnapshotActionTest {
}
@Test
- public void testPost_forCompleteAutoBackup_enqueuesLoadTask_usingBackupName() throws Exception {
+ public void testPost_forCompleteAutoBackup_enqueuesLoadTask_usingBackupName() {
action.snapshotName = "auto_snapshot_somestring";
when(backupService.findByName("auto_snapshot_somestring")).thenReturn(backupInfo);
@@ -165,7 +164,7 @@ public class CheckSnapshotActionTest {
}
@Test
- public void testPost_forCompleteBackup_withExtraKindsToLoad_enqueuesLoadTask() throws Exception {
+ public void testPost_forCompleteBackup_withExtraKindsToLoad_enqueuesLoadTask() {
action.kindsToLoadParam = "one,foo";
action.run();
@@ -174,7 +173,7 @@ public class CheckSnapshotActionTest {
}
@Test
- public void testPost_forCompleteBackup_withEmptyKindsToLoad_skipsLoadTask() throws Exception {
+ public void testPost_forCompleteBackup_withEmptyKindsToLoad_skipsLoadTask() {
action.kindsToLoadParam = "";
action.run();
diff --git a/javatests/google/registry/export/DatastoreBackupServiceTest.java b/javatests/google/registry/export/DatastoreBackupServiceTest.java
index 8fe56e502..4b89271ad 100644
--- a/javatests/google/registry/export/DatastoreBackupServiceTest.java
+++ b/javatests/google/registry/export/DatastoreBackupServiceTest.java
@@ -78,7 +78,7 @@ public class DatastoreBackupServiceTest {
}
@Test
- public void testSuccess_launchBackup() throws Exception {
+ public void testSuccess_launchBackup() {
backupService.launchNewBackup(
"export-snapshot", "backup1", "somebucket", ImmutableSet.of("foo", "bar"));
assertTasksEnqueued("export-snapshot",
diff --git a/javatests/google/registry/export/ExportSnapshotActionTest.java b/javatests/google/registry/export/ExportSnapshotActionTest.java
index 4ba8c532f..a790d3a9f 100644
--- a/javatests/google/registry/export/ExportSnapshotActionTest.java
+++ b/javatests/google/registry/export/ExportSnapshotActionTest.java
@@ -53,7 +53,7 @@ public class ExportSnapshotActionTest {
}
@Test
- public void testPost_launchesBackup_andEnqueuesPollTask() throws Exception {
+ public void testPost_launchesBackup_andEnqueuesPollTask() {
action.run();
verify(backupService)
.launchNewBackup(
diff --git a/javatests/google/registry/export/LoadSnapshotActionTest.java b/javatests/google/registry/export/LoadSnapshotActionTest.java
index 983612dec..e1c9d18df 100644
--- a/javatests/google/registry/export/LoadSnapshotActionTest.java
+++ b/javatests/google/registry/export/LoadSnapshotActionTest.java
@@ -96,7 +96,7 @@ public class LoadSnapshotActionTest {
}
@Test
- public void testSuccess_enqueueLoadTask() throws Exception {
+ public void testSuccess_enqueueLoadTask() {
enqueueLoadSnapshotTask(
"id12345", "gs://bucket/snapshot.backup_info", ImmutableSet.of("one", "two", "three"));
assertTasksEnqueued(
diff --git a/javatests/google/registry/export/UpdateSnapshotViewActionTest.java b/javatests/google/registry/export/UpdateSnapshotViewActionTest.java
index db42fdb2a..ceeb4ffd6 100644
--- a/javatests/google/registry/export/UpdateSnapshotViewActionTest.java
+++ b/javatests/google/registry/export/UpdateSnapshotViewActionTest.java
@@ -84,7 +84,7 @@ public class UpdateSnapshotViewActionTest {
}
@Test
- public void testSuccess_createViewUpdateTask() throws Exception {
+ public void testSuccess_createViewUpdateTask() {
getQueue(QUEUE).add(createViewUpdateTask("some_dataset", "12345_fookind", "fookind"));
assertTasksEnqueued(QUEUE,
new TaskMatcher()
diff --git a/javatests/google/registry/flows/FlowTestCase.java b/javatests/google/registry/flows/FlowTestCase.java
index b91869cd4..409af27f1 100644
--- a/javatests/google/registry/flows/FlowTestCase.java
+++ b/javatests/google/registry/flows/FlowTestCase.java
@@ -246,18 +246,18 @@ public abstract class FlowTestCase extends ShardableTestCase {
public void assertPollMessages(
String clientId,
- PollMessage... expected) throws Exception {
+ PollMessage... expected) {
assertPollMessagesHelper(getPollMessages(clientId), expected);
}
public void assertPollMessages(
String clientId,
DateTime now,
- PollMessage... expected) throws Exception {
+ PollMessage... expected) {
assertPollMessagesHelper(getPollMessages(clientId, now), expected);
}
- public void assertPollMessages(PollMessage... expected) throws Exception {
+ public void assertPollMessages(PollMessage... expected) {
assertPollMessagesHelper(getPollMessages(), expected);
}
diff --git a/javatests/google/registry/flows/ResourceFlowTestCase.java b/javatests/google/registry/flows/ResourceFlowTestCase.java
index f754a87ca..488973f89 100644
--- a/javatests/google/registry/flows/ResourceFlowTestCase.java
+++ b/javatests/google/registry/flows/ResourceFlowTestCase.java
@@ -162,7 +162,7 @@ public abstract class ResourceFlowTestCase void assertAsyncDeletionTaskEnqueued(
- T resource, String requestingClientId, Trid trid, boolean isSuperuser) throws Exception {
+ T resource, String requestingClientId, Trid trid, boolean isSuperuser) {
TaskMatcher expected = new TaskMatcher()
.etaDelta(Duration.standardSeconds(75), Duration.standardSeconds(105)) // expected: 90
.param("resourceKey", Key.create(resource).getString())
diff --git a/javatests/google/registry/flows/contact/ContactTransferApproveFlowTest.java b/javatests/google/registry/flows/contact/ContactTransferApproveFlowTest.java
index cba49516f..560c7cc67 100644
--- a/javatests/google/registry/flows/contact/ContactTransferApproveFlowTest.java
+++ b/javatests/google/registry/flows/contact/ContactTransferApproveFlowTest.java
@@ -49,7 +49,7 @@ public class ContactTransferApproveFlowTest
extends ContactTransferFlowTestCase {
@Before
- public void setUp() throws Exception {
+ public void setUp() {
setEppInput("contact_transfer_approve.xml");
setClientIdForFlow("TheRegistrar");
setupContactWithPendingTransfer();
diff --git a/javatests/google/registry/flows/contact/ContactTransferCancelFlowTest.java b/javatests/google/registry/flows/contact/ContactTransferCancelFlowTest.java
index 6099b4d60..e8fca276e 100644
--- a/javatests/google/registry/flows/contact/ContactTransferCancelFlowTest.java
+++ b/javatests/google/registry/flows/contact/ContactTransferCancelFlowTest.java
@@ -46,7 +46,7 @@ public class ContactTransferCancelFlowTest
extends ContactTransferFlowTestCase {
@Before
- public void setUp() throws Exception {
+ public void setUp() {
this.setEppInput("contact_transfer_cancel.xml");
setClientIdForFlow("NewRegistrar");
setupContactWithPendingTransfer();
diff --git a/javatests/google/registry/flows/contact/ContactTransferQueryFlowTest.java b/javatests/google/registry/flows/contact/ContactTransferQueryFlowTest.java
index 634203424..6edae0e48 100644
--- a/javatests/google/registry/flows/contact/ContactTransferQueryFlowTest.java
+++ b/javatests/google/registry/flows/contact/ContactTransferQueryFlowTest.java
@@ -41,7 +41,7 @@ public class ContactTransferQueryFlowTest
extends ContactTransferFlowTestCase {
@Before
- public void setUp() throws Exception {
+ public void setUp() {
setEppInput("contact_transfer_query.xml");
clock.setTo(DateTime.parse("2000-06-10T22:00:00.0Z"));
setClientIdForFlow("NewRegistrar");
diff --git a/javatests/google/registry/flows/contact/ContactTransferRejectFlowTest.java b/javatests/google/registry/flows/contact/ContactTransferRejectFlowTest.java
index 6669eb446..d5194f093 100644
--- a/javatests/google/registry/flows/contact/ContactTransferRejectFlowTest.java
+++ b/javatests/google/registry/flows/contact/ContactTransferRejectFlowTest.java
@@ -48,7 +48,7 @@ public class ContactTransferRejectFlowTest
extends ContactTransferFlowTestCase {
@Before
- public void setUp() throws Exception {
+ public void setUp() {
setEppInput("contact_transfer_reject.xml");
setClientIdForFlow("TheRegistrar");
setupContactWithPendingTransfer();
diff --git a/javatests/google/registry/flows/domain/DomainApplicationCreateFlowTest.java b/javatests/google/registry/flows/domain/DomainApplicationCreateFlowTest.java
index e8be1e9df..9f8bb5e98 100644
--- a/javatests/google/registry/flows/domain/DomainApplicationCreateFlowTest.java
+++ b/javatests/google/registry/flows/domain/DomainApplicationCreateFlowTest.java
@@ -1845,79 +1845,79 @@ public class DomainApplicationCreateFlowTest
}
@Test
- public void testFailure_uppercase() throws Exception {
+ public void testFailure_uppercase() {
doFailingDomainNameTest("Example.tld", BadDomainNameCharacterException.class);
}
@Test
- public void testFailure_badCharacter() throws Exception {
+ public void testFailure_badCharacter() {
doFailingDomainNameTest("test_example.tld", BadDomainNameCharacterException.class);
}
@Test
- public void testFailure_leadingDash() throws Exception {
+ public void testFailure_leadingDash() {
doFailingDomainNameTest("-example.tld", LeadingDashException.class);
}
@Test
- public void testFailure_trailingDash() throws Exception {
+ public void testFailure_trailingDash() {
doFailingDomainNameTest("example-.tld", TrailingDashException.class);
}
@Test
- public void testFailure_tooLong() throws Exception {
+ public void testFailure_tooLong() {
doFailingDomainNameTest(Strings.repeat("a", 64) + ".tld", DomainLabelTooLongException.class);
}
@Test
- public void testFailure_leadingDot() throws Exception {
+ public void testFailure_leadingDot() {
doFailingDomainNameTest(".example.tld", EmptyDomainNamePartException.class);
}
@Test
- public void testFailure_leadingDotTld() throws Exception {
+ public void testFailure_leadingDotTld() {
doFailingDomainNameTest("foo..tld", EmptyDomainNamePartException.class);
}
@Test
- public void testFailure_tooManyParts() throws Exception {
+ public void testFailure_tooManyParts() {
doFailingDomainNameTest("foo.example.tld", BadDomainNamePartsCountException.class);
}
@Test
- public void testFailure_tooFewParts() throws Exception {
+ public void testFailure_tooFewParts() {
doFailingDomainNameTest("tld", BadDomainNamePartsCountException.class);
}
@Test
- public void testFailure_domainNameExistsAsTld_lowercase() throws Exception {
+ public void testFailure_domainNameExistsAsTld_lowercase() {
createTlds("foo.tld", "tld");
doFailingDomainNameTest("foo.tld", DomainNameExistsAsTldException.class);
}
@Test
- public void testFailure_domainNameExistsAsTld_uppercase() throws Exception {
+ public void testFailure_domainNameExistsAsTld_uppercase() {
createTlds("foo.tld", "tld");
doFailingDomainNameTest("FOO.TLD", BadDomainNameCharacterException.class);
}
@Test
- public void testFailure_invalidPunycode() throws Exception {
+ public void testFailure_invalidPunycode() {
doFailingDomainNameTest("xn--abcdefg.tld", InvalidPunycodeException.class);
}
@Test
- public void testFailure_dashesInThirdAndFourthPosition() throws Exception {
+ public void testFailure_dashesInThirdAndFourthPosition() {
doFailingDomainNameTest("ab--cdefg.tld", DashesInThirdAndFourthException.class);
}
@Test
- public void testFailure_tldDoesNotExist() throws Exception {
+ public void testFailure_tldDoesNotExist() {
doFailingDomainNameTest("foo.nosuchtld", TldDoesNotExistException.class);
}
@Test
- public void testFailure_invalidIdnCodePoints() throws Exception {
+ public void testFailure_invalidIdnCodePoints() {
// ❤☀☆☂☻♞☯.tld
doFailingDomainNameTest("xn--k3hel9n7bxlu1e.tld", InvalidIdnDomainLabelException.class);
}
diff --git a/javatests/google/registry/flows/domain/DomainApplicationUpdateFlowTest.java b/javatests/google/registry/flows/domain/DomainApplicationUpdateFlowTest.java
index 08ce37c8d..a456b2da0 100644
--- a/javatests/google/registry/flows/domain/DomainApplicationUpdateFlowTest.java
+++ b/javatests/google/registry/flows/domain/DomainApplicationUpdateFlowTest.java
@@ -111,7 +111,7 @@ public class DomainApplicationUpdateFlowTest
unusedContact = persistActiveContact("unused");
}
- private DomainApplication persistApplication() throws Exception {
+ private DomainApplication persistApplication() {
return persistResource(
newApplicationBuilder()
.setContacts(
@@ -129,7 +129,7 @@ public class DomainApplicationUpdateFlowTest
return newDomainApplication("example.tld").asBuilder().setRepoId("1-TLD");
}
- private DomainApplication persistNewApplication() throws Exception {
+ private DomainApplication persistNewApplication() {
return persistResource(newApplicationBuilder().build());
}
@@ -360,7 +360,7 @@ public class DomainApplicationUpdateFlowTest
}
private void doSecDnsFailingTest(
- Class extends EppException> expectedException, String xmlFilename) throws Exception {
+ Class extends EppException> expectedException, String xmlFilename) {
setEppInput(xmlFilename);
persistReferencedEntities();
persistNewApplication();
@@ -369,30 +369,30 @@ public class DomainApplicationUpdateFlowTest
}
@Test
- public void testFailure_secDnsAllCannotBeFalse() throws Exception {
+ public void testFailure_secDnsAllCannotBeFalse() {
doSecDnsFailingTest(
SecDnsAllUsageException.class, "domain_update_sunrise_dsdata_rem_all_false.xml");
}
@Test
- public void testFailure_secDnsEmptyNotAllowed() throws Exception {
+ public void testFailure_secDnsEmptyNotAllowed() {
doSecDnsFailingTest(EmptySecDnsUpdateException.class, "domain_update_sunrise_dsdata_empty.xml");
}
@Test
- public void testFailure_secDnsUrgentNotSupported() throws Exception {
+ public void testFailure_secDnsUrgentNotSupported() {
doSecDnsFailingTest(
UrgentAttributeNotSupportedException.class, "domain_update_sunrise_dsdata_urgent.xml");
}
@Test
- public void testFailure_secDnsChangeNotSupported() throws Exception {
+ public void testFailure_secDnsChangeNotSupported() {
doSecDnsFailingTest(
MaxSigLifeChangeNotSupportedException.class, "domain_update_sunrise_maxsiglife.xml");
}
@Test
- public void testFailure_secDnsTooManyDsRecords() throws Exception {
+ public void testFailure_secDnsTooManyDsRecords() {
ImmutableSet.Builder builder = new ImmutableSet.Builder<>();
for (int i = 0; i < 8; ++i) {
builder.add(DelegationSignerData.create(i, 2, 3, new byte[] {0, 1, 2}));
@@ -437,7 +437,7 @@ public class DomainApplicationUpdateFlowTest
}
@Test
- public void testFailure_applicationDomainNameMismatch() throws Exception {
+ public void testFailure_applicationDomainNameMismatch() {
persistReferencedEntities();
persistResource(newApplicationBuilder().setFullyQualifiedDomainName("something.tld").build());
EppException thrown = assertThrows(ApplicationDomainNameMismatchException.class, this::runFlow);
@@ -462,7 +462,7 @@ public class DomainApplicationUpdateFlowTest
}
@Test
- public void testFailure_clientUpdateProhibited() throws Exception {
+ public void testFailure_clientUpdateProhibited() {
setEppInput("domain_update_sunrise_authinfo.xml");
persistReferencedEntities();
persistResource(
@@ -475,7 +475,7 @@ public class DomainApplicationUpdateFlowTest
}
@Test
- public void testFailure_serverUpdateProhibited() throws Exception {
+ public void testFailure_serverUpdateProhibited() {
persistReferencedEntities();
persistResource(
newApplicationBuilder()
@@ -486,7 +486,7 @@ public class DomainApplicationUpdateFlowTest
assertThat(thrown).hasMessageThat().contains("serverUpdateProhibited");
}
- private void doIllegalApplicationStatusTest(ApplicationStatus status) throws Exception {
+ private void doIllegalApplicationStatusTest(ApplicationStatus status) {
persistReferencedEntities();
persistResource(newApplicationBuilder().setApplicationStatus(status).build());
EppException thrown =
@@ -495,22 +495,22 @@ public class DomainApplicationUpdateFlowTest
}
@Test
- public void testFailure_allocatedApplicationStatus() throws Exception {
+ public void testFailure_allocatedApplicationStatus() {
doIllegalApplicationStatusTest(ApplicationStatus.ALLOCATED);
}
@Test
- public void testFailure_invalidApplicationStatus() throws Exception {
+ public void testFailure_invalidApplicationStatus() {
doIllegalApplicationStatusTest(ApplicationStatus.INVALID);
}
@Test
- public void testFailure_rejectedApplicationStatus() throws Exception {
+ public void testFailure_rejectedApplicationStatus() {
doIllegalApplicationStatusTest(ApplicationStatus.REJECTED);
}
@Test
- public void testFailure_missingHost() throws Exception {
+ public void testFailure_missingHost() {
persistActiveHost("ns1.example.tld");
persistActiveContact("sh8013");
persistActiveContact("mak21");
@@ -521,7 +521,7 @@ public class DomainApplicationUpdateFlowTest
}
@Test
- public void testFailure_missingContact() throws Exception {
+ public void testFailure_missingContact() {
persistActiveHost("ns1.example.tld");
persistActiveHost("ns2.example.tld");
persistActiveContact("mak21");
@@ -553,7 +553,7 @@ public class DomainApplicationUpdateFlowTest
}
@Test
- public void testFailure_clientProhibitedStatusValue() throws Exception {
+ public void testFailure_clientProhibitedStatusValue() {
setEppInput("domain_update_sunrise_prohibited_status.xml");
persistReferencedEntities();
persistNewApplication();
@@ -572,7 +572,7 @@ public class DomainApplicationUpdateFlowTest
}
@Test
- public void testFailure_duplicateContactInCommand() throws Exception {
+ public void testFailure_duplicateContactInCommand() {
setEppInput("domain_update_sunrise_duplicate_contact.xml");
persistReferencedEntities();
persistNewApplication();
@@ -581,7 +581,7 @@ public class DomainApplicationUpdateFlowTest
}
@Test
- public void testFailure_missingContactType() throws Exception {
+ public void testFailure_missingContactType() {
setEppInput("domain_update_sunrise_missing_contact_type.xml");
persistReferencedEntities();
persistNewApplication();
@@ -591,7 +591,7 @@ public class DomainApplicationUpdateFlowTest
}
@Test
- public void testFailure_unauthorizedClient() throws Exception {
+ public void testFailure_unauthorizedClient() {
sessionMetadata.setClientId("NewRegistrar");
persistReferencedEntities();
persistApplication();
@@ -610,7 +610,7 @@ public class DomainApplicationUpdateFlowTest
}
@Test
- public void testFailure_notAuthorizedForTld() throws Exception {
+ public void testFailure_notAuthorizedForTld() {
persistResource(
loadRegistrar("TheRegistrar").asBuilder().setAllowedTlds(ImmutableSet.of()).build());
persistReferencedEntities();
@@ -631,7 +631,7 @@ public class DomainApplicationUpdateFlowTest
}
@Test
- public void testFailure_sameNameserverAddedAndRemoved() throws Exception {
+ public void testFailure_sameNameserverAddedAndRemoved() {
setEppInput("domain_update_sunrise_add_remove_same_host.xml");
persistReferencedEntities();
persistResource(
@@ -646,7 +646,7 @@ public class DomainApplicationUpdateFlowTest
}
@Test
- public void testFailure_sameContactAddedAndRemoved() throws Exception {
+ public void testFailure_sameContactAddedAndRemoved() {
setEppInput("domain_update_sunrise_add_remove_same_contact.xml");
persistReferencedEntities();
persistResource(
@@ -663,7 +663,7 @@ public class DomainApplicationUpdateFlowTest
}
@Test
- public void testFailure_removeAdmin() throws Exception {
+ public void testFailure_removeAdmin() {
setEppInput("domain_update_sunrise_remove_admin.xml");
persistReferencedEntities();
persistResource(
@@ -678,7 +678,7 @@ public class DomainApplicationUpdateFlowTest
}
@Test
- public void testFailure_removeTech() throws Exception {
+ public void testFailure_removeTech() {
setEppInput("domain_update_sunrise_remove_tech.xml");
persistReferencedEntities();
persistResource(
@@ -693,7 +693,7 @@ public class DomainApplicationUpdateFlowTest
}
@Test
- public void testFailure_newRegistrantNotWhitelisted() throws Exception {
+ public void testFailure_newRegistrantNotWhitelisted() {
persistReferencedEntities();
persistApplication();
persistResource(
@@ -707,7 +707,7 @@ public class DomainApplicationUpdateFlowTest
}
@Test
- public void testFailure_newNameserverNotWhitelisted() throws Exception {
+ public void testFailure_newNameserverNotWhitelisted() {
persistReferencedEntities();
persistApplication();
persistResource(
@@ -734,7 +734,7 @@ public class DomainApplicationUpdateFlowTest
}
@Test
- public void testFailure_tldWithNameserverWhitelist_removeLastNameserver() throws Exception {
+ public void testFailure_tldWithNameserverWhitelist_removeLastNameserver() {
setEppInput("domain_update_sunrise_remove_nameserver.xml");
persistReferencedEntities();
persistApplication();
@@ -790,7 +790,7 @@ public class DomainApplicationUpdateFlowTest
}
@Test
- public void testFailure_domainNameserverRestricted_addedNameserverDisallowed() throws Exception {
+ public void testFailure_domainNameserverRestricted_addedNameserverDisallowed() {
persistReferencedEntities();
persistApplication();
persistResource(
@@ -807,7 +807,7 @@ public class DomainApplicationUpdateFlowTest
}
@Test
- public void testFailure_domainNameserverRestricted_removeLastNameserver() throws Exception {
+ public void testFailure_domainNameserverRestricted_removeLastNameserver() {
setEppInput("domain_update_sunrise_remove_nameserver.xml");
persistReferencedEntities();
persistApplication();
@@ -868,8 +868,7 @@ public class DomainApplicationUpdateFlowTest
}
@Test
- public void testFailure_addedNameserversAllowedInTld_disallowedInDomainNameserversWhitelists()
- throws Exception {
+ public void testFailure_addedNameserversAllowedInTld_disallowedInDomainNameserversWhitelists() {
persistReferencedEntities();
persistApplication();
persistResource(
@@ -888,8 +887,7 @@ public class DomainApplicationUpdateFlowTest
}
@Test
- public void testFailure_addedNameserversDisallowedInTld_AllowedInDomainNameserversWhitelists()
- throws Exception {
+ public void testFailure_addedNameserversDisallowedInTld_AllowedInDomainNameserversWhitelists() {
persistReferencedEntities();
persistApplication();
persistResource(
diff --git a/javatests/google/registry/flows/domain/DomainCheckFlowTest.java b/javatests/google/registry/flows/domain/DomainCheckFlowTest.java
index a83888a21..5e3b00255 100644
--- a/javatests/google/registry/flows/domain/DomainCheckFlowTest.java
+++ b/javatests/google/registry/flows/domain/DomainCheckFlowTest.java
@@ -92,7 +92,7 @@ public class DomainCheckFlowTest
}
@Before
- public void initCheckTest() throws Exception {
+ public void initCheckTest() {
createTld("tld", TldState.QUIET_PERIOD);
persistResource(Registry.get("tld").asBuilder().setReservedLists(createReservedList()).build());
}
@@ -366,79 +366,79 @@ public class DomainCheckFlowTest
}
@Test
- public void testFailure_uppercase() throws Exception {
+ public void testFailure_uppercase() {
doFailingBadLabelTest("FOO.tld", BadDomainNameCharacterException.class);
}
@Test
- public void testFailure_badCharacter() throws Exception {
+ public void testFailure_badCharacter() {
doFailingBadLabelTest("test_example.tld", BadDomainNameCharacterException.class);
}
@Test
- public void testFailure_leadingDash() throws Exception {
+ public void testFailure_leadingDash() {
doFailingBadLabelTest("-example.tld", LeadingDashException.class);
}
@Test
- public void testFailure_trailingDash() throws Exception {
+ public void testFailure_trailingDash() {
doFailingBadLabelTest("example-.tld", TrailingDashException.class);
}
@Test
- public void testFailure_tooLong() throws Exception {
+ public void testFailure_tooLong() {
doFailingBadLabelTest(Strings.repeat("a", 64) + ".tld", DomainLabelTooLongException.class);
}
@Test
- public void testFailure_leadingDot() throws Exception {
+ public void testFailure_leadingDot() {
doFailingBadLabelTest(".example.tld", EmptyDomainNamePartException.class);
}
@Test
- public void testFailure_leadingDotTld() throws Exception {
+ public void testFailure_leadingDotTld() {
doFailingBadLabelTest("foo..tld", EmptyDomainNamePartException.class);
}
@Test
- public void testFailure_tooManyParts() throws Exception {
+ public void testFailure_tooManyParts() {
doFailingBadLabelTest("foo.example.tld", BadDomainNamePartsCountException.class);
}
@Test
- public void testFailure_tooFewParts() throws Exception {
+ public void testFailure_tooFewParts() {
doFailingBadLabelTest("tld", BadDomainNamePartsCountException.class);
}
@Test
- public void testFailure_domainNameExistsAsTld_lowercase() throws Exception {
+ public void testFailure_domainNameExistsAsTld_lowercase() {
createTlds("foo.tld", "tld");
doFailingBadLabelTest("foo.tld", DomainNameExistsAsTldException.class);
}
@Test
- public void testFailure_domainNameExistsAsTld_uppercase() throws Exception {
+ public void testFailure_domainNameExistsAsTld_uppercase() {
createTlds("foo.tld", "tld");
doFailingBadLabelTest("FOO.TLD", BadDomainNameCharacterException.class);
}
@Test
- public void testFailure_invalidPunycode() throws Exception {
+ public void testFailure_invalidPunycode() {
doFailingBadLabelTest("xn--abcdefg.tld", InvalidPunycodeException.class);
}
@Test
- public void testFailure_dashesInThirdAndFourthPosition() throws Exception {
+ public void testFailure_dashesInThirdAndFourthPosition() {
doFailingBadLabelTest("ab--cdefg.tld", DashesInThirdAndFourthException.class);
}
@Test
- public void testFailure_tldDoesNotExist() throws Exception {
+ public void testFailure_tldDoesNotExist() {
doFailingBadLabelTest("foo.nosuchtld", TldDoesNotExistException.class);
}
@Test
- public void testFailure_invalidIdnCodePoints() throws Exception {
+ public void testFailure_invalidIdnCodePoints() {
// ❤☀☆☂☻♞☯.tld
doFailingBadLabelTest("xn--k3hel9n7bxlu1e.tld", InvalidIdnDomainLabelException.class);
}
diff --git a/javatests/google/registry/flows/domain/DomainCreateFlowTest.java b/javatests/google/registry/flows/domain/DomainCreateFlowTest.java
index 4954bedbb..111c3b5aa 100644
--- a/javatests/google/registry/flows/domain/DomainCreateFlowTest.java
+++ b/javatests/google/registry/flows/domain/DomainCreateFlowTest.java
@@ -883,7 +883,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase {
@Before
- public void setUp() throws Exception {
+ public void setUp() {
setEppInput("domain_transfer_approve.xml");
// Change the registry so that the renew price changes a day minus 1 millisecond before the
// transfer (right after there will be an autorenew in the test case that has one) and then
diff --git a/javatests/google/registry/flows/domain/DomainTransferCancelFlowTest.java b/javatests/google/registry/flows/domain/DomainTransferCancelFlowTest.java
index 02f7ee2af..db9e8a2a2 100644
--- a/javatests/google/registry/flows/domain/DomainTransferCancelFlowTest.java
+++ b/javatests/google/registry/flows/domain/DomainTransferCancelFlowTest.java
@@ -63,7 +63,7 @@ public class DomainTransferCancelFlowTest
extends DomainTransferFlowTestCase {
@Before
- public void setUp() throws Exception {
+ public void setUp() {
setEppInput("domain_transfer_cancel.xml");
setClientIdForFlow("NewRegistrar");
setupDomainWithPendingTransfer("example", "tld");
diff --git a/javatests/google/registry/flows/domain/DomainTransferFlowTestCase.java b/javatests/google/registry/flows/domain/DomainTransferFlowTestCase.java
index 456525c76..7f45a009b 100644
--- a/javatests/google/registry/flows/domain/DomainTransferFlowTestCase.java
+++ b/javatests/google/registry/flows/domain/DomainTransferFlowTestCase.java
@@ -220,7 +220,7 @@ public class DomainTransferFlowTestCase
}
/** Adds a domain that has a pending transfer on it from TheRegistrar to NewRegistrar. */
- protected void setupDomainWithPendingTransfer(String label, String tld) throws Exception {
+ protected void setupDomainWithPendingTransfer(String label, String tld) {
setupDomain(label, tld);
domain = persistWithPendingTransfer(domain);
}
diff --git a/javatests/google/registry/flows/domain/DomainTransferQueryFlowTest.java b/javatests/google/registry/flows/domain/DomainTransferQueryFlowTest.java
index ba4fac8d5..e7434d093 100644
--- a/javatests/google/registry/flows/domain/DomainTransferQueryFlowTest.java
+++ b/javatests/google/registry/flows/domain/DomainTransferQueryFlowTest.java
@@ -42,7 +42,7 @@ public class DomainTransferQueryFlowTest
extends DomainTransferFlowTestCase {
@Before
- public void setUp() throws Exception {
+ public void setUp() {
setEppInput("domain_transfer_query.xml");
setClientIdForFlow("NewRegistrar");
setupDomainWithPendingTransfer("example", "tld");
diff --git a/javatests/google/registry/flows/domain/DomainTransferRejectFlowTest.java b/javatests/google/registry/flows/domain/DomainTransferRejectFlowTest.java
index 17fa3f656..41c0d1e26 100644
--- a/javatests/google/registry/flows/domain/DomainTransferRejectFlowTest.java
+++ b/javatests/google/registry/flows/domain/DomainTransferRejectFlowTest.java
@@ -66,7 +66,7 @@ public class DomainTransferRejectFlowTest
extends DomainTransferFlowTestCase {
@Before
- public void setUp() throws Exception {
+ public void setUp() {
setEppInput("domain_transfer_reject.xml");
setClientIdForFlow("TheRegistrar");
setupDomainWithPendingTransfer("example", "tld");
diff --git a/javatests/google/registry/flows/domain/DomainTransferRequestFlowTest.java b/javatests/google/registry/flows/domain/DomainTransferRequestFlowTest.java
index 96046ad86..2ff63eaa9 100644
--- a/javatests/google/registry/flows/domain/DomainTransferRequestFlowTest.java
+++ b/javatests/google/registry/flows/domain/DomainTransferRequestFlowTest.java
@@ -209,8 +209,7 @@ public class DomainTransferRequestFlowTest
Optional transferCost,
ImmutableSet originalGracePeriods,
boolean expectTransferBillingEvent,
- BillingEvent.Cancellation.Builder... extraExpectedBillingEvents)
- throws Exception {
+ BillingEvent.Cancellation.Builder... extraExpectedBillingEvents) {
Registry registry = Registry.get(domain.getTld());
final HistoryEntry historyEntryTransferRequest =
getOnlyHistoryEntryOfType(domain, DOMAIN_TRANSFER_REQUEST);
@@ -668,7 +667,7 @@ public class DomainTransferRequestFlowTest
}
@Test
- public void testFailure_refundableFee_v06() throws Exception {
+ public void testFailure_refundableFee_v06() {
setupDomain("example", "tld");
EppException thrown =
assertThrows(
@@ -678,7 +677,7 @@ public class DomainTransferRequestFlowTest
}
@Test
- public void testFailure_refundableFee_v11() throws Exception {
+ public void testFailure_refundableFee_v11() {
setupDomain("example", "tld");
EppException thrown =
assertThrows(
@@ -688,7 +687,7 @@ public class DomainTransferRequestFlowTest
}
@Test
- public void testFailure_refundableFee_v12() throws Exception {
+ public void testFailure_refundableFee_v12() {
setupDomain("example", "tld");
EppException thrown =
assertThrows(
@@ -698,7 +697,7 @@ public class DomainTransferRequestFlowTest
}
@Test
- public void testFailure_gracePeriodFee_v06() throws Exception {
+ public void testFailure_gracePeriodFee_v06() {
setupDomain("example", "tld");
EppException thrown =
assertThrows(
@@ -708,7 +707,7 @@ public class DomainTransferRequestFlowTest
}
@Test
- public void testFailure_gracePeriodFee_v11() throws Exception {
+ public void testFailure_gracePeriodFee_v11() {
setupDomain("example", "tld");
EppException thrown =
assertThrows(
@@ -718,7 +717,7 @@ public class DomainTransferRequestFlowTest
}
@Test
- public void testFailure_gracePeriodFee_v12() throws Exception {
+ public void testFailure_gracePeriodFee_v12() {
setupDomain("example", "tld");
EppException thrown =
assertThrows(
@@ -728,7 +727,7 @@ public class DomainTransferRequestFlowTest
}
@Test
- public void testFailure_appliedFee_v06() throws Exception {
+ public void testFailure_appliedFee_v06() {
setupDomain("example", "tld");
EppException thrown =
assertThrows(
@@ -738,7 +737,7 @@ public class DomainTransferRequestFlowTest
}
@Test
- public void testFailure_appliedFee_v11() throws Exception {
+ public void testFailure_appliedFee_v11() {
setupDomain("example", "tld");
EppException thrown =
assertThrows(
@@ -748,7 +747,7 @@ public class DomainTransferRequestFlowTest
}
@Test
- public void testFailure_appliedFee_v12() throws Exception {
+ public void testFailure_appliedFee_v12() {
setupDomain("example", "tld");
EppException thrown =
assertThrows(
@@ -788,7 +787,7 @@ public class DomainTransferRequestFlowTest
}
@Test
- public void testFailure_multiYearPeriod() throws Exception {
+ public void testFailure_multiYearPeriod() {
setupDomain("example", "tld");
clock.advanceOneMilli();
EppException thrown =
@@ -879,7 +878,7 @@ public class DomainTransferRequestFlowTest
}
@Test
- public void testFailure_superuserExtension_twoYearPeriod() throws Exception {
+ public void testFailure_superuserExtension_twoYearPeriod() {
setupDomain("example", "tld");
eppRequestSource = EppRequestSource.TOOL;
clock.advanceOneMilli();
@@ -893,7 +892,7 @@ public class DomainTransferRequestFlowTest
}
@Test
- public void testFailure_superuserExtension_zeroPeriod_feeTransferExtension() throws Exception {
+ public void testFailure_superuserExtension_zeroPeriod_feeTransferExtension() {
setupDomain("example", "tld");
eppRequestSource = EppRequestSource.TOOL;
clock.advanceOneMilli();
@@ -950,7 +949,7 @@ public class DomainTransferRequestFlowTest
}
@Test
- public void testFailure_notAuthorizedForTld() throws Exception {
+ public void testFailure_notAuthorizedForTld() {
setupDomain("example", "tld");
persistResource(
loadRegistrar("NewRegistrar").asBuilder().setAllowedTlds(ImmutableSet.of()).build());
@@ -1091,7 +1090,7 @@ public class DomainTransferRequestFlowTest
runTest("domain_transfer_request_premium.xml", UserPrivileges.SUPERUSER);
}
- private void runWrongCurrencyTest(Map substitutions) throws Exception {
+ private void runWrongCurrencyTest(Map substitutions) {
setupDomain("example", "tld");
persistResource(
Registry.get("tld")
@@ -1111,25 +1110,25 @@ public class DomainTransferRequestFlowTest
}
@Test
- public void testFailure_wrongCurrency_v06() throws Exception {
+ public void testFailure_wrongCurrency_v06() {
setupDomain("example", "tld");
runWrongCurrencyTest(FEE_06_MAP);
}
@Test
- public void testFailure_wrongCurrency_v11() throws Exception {
+ public void testFailure_wrongCurrency_v11() {
setupDomain("example", "tld");
runWrongCurrencyTest(FEE_11_MAP);
}
@Test
- public void testFailure_wrongCurrency_v12() throws Exception {
+ public void testFailure_wrongCurrency_v12() {
setupDomain("example", "tld");
runWrongCurrencyTest(FEE_12_MAP);
}
@Test
- public void testFailure_feeGivenInWrongScale_v06() throws Exception {
+ public void testFailure_feeGivenInWrongScale_v06() {
setupDomain("example", "tld");
EppException thrown =
assertThrows(
@@ -1139,7 +1138,7 @@ public class DomainTransferRequestFlowTest
}
@Test
- public void testFailure_feeGivenInWrongScale_v11() throws Exception {
+ public void testFailure_feeGivenInWrongScale_v11() {
setupDomain("example", "tld");
EppException thrown =
assertThrows(
@@ -1149,7 +1148,7 @@ public class DomainTransferRequestFlowTest
}
@Test
- public void testFailure_feeGivenInWrongScale_v12() throws Exception {
+ public void testFailure_feeGivenInWrongScale_v12() {
setupDomain("example", "tld");
EppException thrown =
assertThrows(
@@ -1172,25 +1171,25 @@ public class DomainTransferRequestFlowTest
}
@Test
- public void testFailure_wrongFeeAmount_v06() throws Exception {
+ public void testFailure_wrongFeeAmount_v06() {
setupDomain("example", "tld");
runWrongFeeAmountTest(FEE_06_MAP);
}
@Test
- public void testFailure_wrongFeeAmount_v11() throws Exception {
+ public void testFailure_wrongFeeAmount_v11() {
setupDomain("example", "tld");
runWrongFeeAmountTest(FEE_11_MAP);
}
@Test
- public void testFailure_wrongFeeAmount_v12() throws Exception {
+ public void testFailure_wrongFeeAmount_v12() {
setupDomain("example", "tld");
runWrongFeeAmountTest(FEE_12_MAP);
}
@Test
- public void testFailure_premiumBlocked() throws Exception {
+ public void testFailure_premiumBlocked() {
setupDomain("rich", "example");
// Modify the Registrar to block premium names.
persistResource(loadRegistrar("NewRegistrar").asBuilder().setBlockPremiumNames(true).build());
@@ -1202,7 +1201,7 @@ public class DomainTransferRequestFlowTest
}
@Test
- public void testFailure_registryRequiresAcking_feeNotProvidedOnPremiumName() throws Exception {
+ public void testFailure_registryRequiresAcking_feeNotProvidedOnPremiumName() {
setupDomain("rich", "example");
EppException thrown =
assertThrows(
@@ -1212,7 +1211,7 @@ public class DomainTransferRequestFlowTest
}
@Test
- public void testFailure_registrarRequiresAcking_feeNotProvidedOnPremiumName() throws Exception {
+ public void testFailure_registrarRequiresAcking_feeNotProvidedOnPremiumName() {
setupDomain("rich", "example");
persistResource(Registry.get("example").asBuilder().setPremiumPriceAckRequired(false).build());
persistResource(
@@ -1226,7 +1225,7 @@ public class DomainTransferRequestFlowTest
}
@Test
- public void testFailure_noAuthInfo() throws Exception {
+ public void testFailure_noAuthInfo() {
setupDomain("example", "tld");
EppException thrown =
assertThrows(
@@ -1236,7 +1235,7 @@ public class DomainTransferRequestFlowTest
}
@Test
- public void testFailure_badContactPassword() throws Exception {
+ public void testFailure_badContactPassword() {
setupDomain("example", "tld");
// Change the contact's password so it does not match the password in the file.
contact =
@@ -1253,7 +1252,7 @@ public class DomainTransferRequestFlowTest
}
@Test
- public void testFailure_badContactRepoId() throws Exception {
+ public void testFailure_badContactRepoId() {
setupDomain("example", "tld");
// Set the contact to a different ROID, but don't persist it; this is just so the substitution
// code above will write the wrong ROID into the file.
@@ -1301,7 +1300,7 @@ public class DomainTransferRequestFlowTest
}
@Test
- public void testFailure_pending() throws Exception {
+ public void testFailure_pending() {
setupDomain("example", "tld");
domain =
persistResource(
@@ -1323,7 +1322,7 @@ public class DomainTransferRequestFlowTest
}
@Test
- public void testFailure_badDomainPassword() throws Exception {
+ public void testFailure_badDomainPassword() {
setupDomain("example", "tld");
// Change the domain's password so it does not match the password in the file.
domain =
@@ -1340,7 +1339,7 @@ public class DomainTransferRequestFlowTest
}
@Test
- public void testFailure_sponsoringClient() throws Exception {
+ public void testFailure_sponsoringClient() {
setupDomain("example", "tld");
setClientIdForFlow("TheRegistrar");
EppException thrown =
@@ -1389,7 +1388,7 @@ public class DomainTransferRequestFlowTest
}
@Test
- public void testFailure_periodInMonths() throws Exception {
+ public void testFailure_periodInMonths() {
setupDomain("example", "tld");
EppException thrown =
assertThrows(
@@ -1399,7 +1398,7 @@ public class DomainTransferRequestFlowTest
}
@Test
- public void testFailure_clientTransferProhibited() throws Exception {
+ public void testFailure_clientTransferProhibited() {
setupDomain("example", "tld");
domain =
persistResource(
@@ -1412,7 +1411,7 @@ public class DomainTransferRequestFlowTest
}
@Test
- public void testFailure_serverTransferProhibited() throws Exception {
+ public void testFailure_serverTransferProhibited() {
setupDomain("example", "tld");
domain =
persistResource(
@@ -1425,7 +1424,7 @@ public class DomainTransferRequestFlowTest
}
@Test
- public void testFailure_pendingDelete() throws Exception {
+ public void testFailure_pendingDelete() {
setupDomain("example", "tld");
domain = persistResource(domain.asBuilder().addStatusValue(StatusValue.PENDING_DELETE).build());
ResourceStatusProhibitsOperationException thrown =
diff --git a/javatests/google/registry/flows/host/HostCreateFlowTest.java b/javatests/google/registry/flows/host/HostCreateFlowTest.java
index 2f8607a7d..046ad78e2 100644
--- a/javatests/google/registry/flows/host/HostCreateFlowTest.java
+++ b/javatests/google/registry/flows/host/HostCreateFlowTest.java
@@ -255,32 +255,32 @@ public class HostCreateFlowTest extends ResourceFlowTestCase {
}
@Test
- public void testFailure_invalidVersion() throws Exception {
+ public void testFailure_invalidVersion() {
doFailingTest("login_invalid_version.xml", UnimplementedProtocolVersionException.class);
}
@Test
- public void testFailure_invalidLanguage() throws Exception {
+ public void testFailure_invalidLanguage() {
doFailingTest("login_invalid_language.xml", UnsupportedLanguageException.class);
}
@Test
- public void testFailure_invalidExtension() throws Exception {
+ public void testFailure_invalidExtension() {
doFailingTest("login_invalid_extension.xml", UnimplementedExtensionException.class);
}
@Test
- public void testFailure_invalidTypes() throws Exception {
+ public void testFailure_invalidTypes() {
doFailingTest("login_invalid_types.xml", UnimplementedObjectServiceException.class);
}
@Test
- public void testFailure_newPassword() throws Exception {
+ public void testFailure_newPassword() {
doFailingTest("login_invalid_newpw.xml", PasswordChangesNotSupportedException.class);
}
@Test
- public void testFailure_unknownRegistrar() throws Exception {
+ public void testFailure_unknownRegistrar() {
deleteResource(getRegistrarBuilder().build());
doFailingTest("login_valid.xml", BadRegistrarClientIdException.class);
}
@Test
- public void testFailure_pendingRegistrar() throws Exception {
+ public void testFailure_pendingRegistrar() {
persistResource(getRegistrarBuilder().setState(State.PENDING).build());
doFailingTest("login_valid.xml", RegistrarAccountNotActiveException.class);
}
@Test
- public void testFailure_incorrectPassword() throws Exception {
+ public void testFailure_incorrectPassword() {
persistResource(getRegistrarBuilder().setPassword("diff password").build());
doFailingTest("login_valid.xml", BadRegistrarPasswordException.class);
}
@Test
- public void testFailure_tooManyFailedLogins() throws Exception {
+ public void testFailure_tooManyFailedLogins() {
persistResource(getRegistrarBuilder().setPassword("diff password").build());
doFailingTest("login_valid.xml", BadRegistrarPasswordException.class);
doFailingTest("login_valid.xml", BadRegistrarPasswordException.class);
@@ -139,7 +139,7 @@ public abstract class LoginFlowTestCase extends FlowTestCase {
}
@Test
- public void testFailure_alreadyLoggedIn() throws Exception {
+ public void testFailure_alreadyLoggedIn() {
sessionMetadata.setClientId("something");
doFailingTest("login_valid.xml", AlreadyLoggedInException.class);
}
diff --git a/javatests/google/registry/flows/session/LoginFlowViaConsoleTest.java b/javatests/google/registry/flows/session/LoginFlowViaConsoleTest.java
index 78e8d4186..2c801ffa2 100644
--- a/javatests/google/registry/flows/session/LoginFlowViaConsoleTest.java
+++ b/javatests/google/registry/flows/session/LoginFlowViaConsoleTest.java
@@ -44,27 +44,27 @@ public class LoginFlowViaConsoleTest extends LoginFlowTestCase {
}
@Test
- public void testFailure_withoutLoginAndLinkedAccount() throws Exception {
+ public void testFailure_withoutLoginAndLinkedAccount() {
persistLinkedAccount("person@example.com", GAE_USER_ID1);
credentials = GaeUserCredentials.forLoggedOutUser();
doFailingTest("login_valid.xml", UserNotLoggedInException.class);
}
@Test
- public void testFailure_withoutLoginAndWithoutLinkedAccount() throws Exception {
+ public void testFailure_withoutLoginAndWithoutLinkedAccount() {
credentials = GaeUserCredentials.forLoggedOutUser();
doFailingTest("login_valid.xml", UserNotLoggedInException.class);
}
@Test
- public void testFailure_withLoginAndWithoutLinkedAccount() throws Exception {
+ public void testFailure_withLoginAndWithoutLinkedAccount() {
credentials =
GaeUserCredentials.forTestingUser(new User("person", "example.com", GAE_USER_ID1), false);
doFailingTest("login_valid.xml", BadGaeUserIdException.class);
}
@Test
- public void testFailure_withLoginAndNoMatchingLinkedAccount() throws Exception {
+ public void testFailure_withLoginAndNoMatchingLinkedAccount() {
persistLinkedAccount("joe@example.com", GAE_USER_ID2);
credentials =
GaeUserCredentials.forTestingUser(new User("person", "example.com", GAE_USER_ID1), false);
diff --git a/javatests/google/registry/flows/session/LoginFlowViaTlsTest.java b/javatests/google/registry/flows/session/LoginFlowViaTlsTest.java
index 5e56033f0..f6010e359 100644
--- a/javatests/google/registry/flows/session/LoginFlowViaTlsTest.java
+++ b/javatests/google/registry/flows/session/LoginFlowViaTlsTest.java
@@ -88,28 +88,28 @@ public class LoginFlowViaTlsTest extends LoginFlowTestCase {
}
@Test
- public void testFailure_incorrectClientCertificateHash() throws Exception {
+ public void testFailure_incorrectClientCertificateHash() {
persistResource(getRegistrarBuilder().build());
credentials = new TlsCredentials(BAD_CERT, GOOD_IP, "goo.example");
doFailingTest("login_valid.xml", BadRegistrarCertificateException.class);
}
@Test
- public void testFailure_missingClientCertificateHash() throws Exception {
+ public void testFailure_missingClientCertificateHash() {
persistResource(getRegistrarBuilder().build());
credentials = new TlsCredentials(null, GOOD_IP, "goo.example");
doFailingTest("login_valid.xml", MissingRegistrarCertificateException.class);
}
@Test
- public void testFailure_noSniAndCertRequired() throws Exception {
+ public void testFailure_noSniAndCertRequired() {
persistResource(getRegistrarBuilder().build());
credentials = new TlsCredentials(null, GOOD_IP, null);
doFailingTest("login_valid.xml", NoSniException.class);
}
@Test
- public void testFailure_missingClientIpAddress() throws Exception {
+ public void testFailure_missingClientIpAddress() {
persistResource(
getRegistrarBuilder()
.setIpAddressWhitelist(ImmutableList.of(
@@ -121,7 +121,7 @@ public class LoginFlowViaTlsTest extends LoginFlowTestCase {
}
@Test
- public void testFailure_incorrectClientIpv4Address() throws Exception {
+ public void testFailure_incorrectClientIpv4Address() {
persistResource(
getRegistrarBuilder()
.setIpAddressWhitelist(ImmutableList.of(
@@ -133,7 +133,7 @@ public class LoginFlowViaTlsTest extends LoginFlowTestCase {
}
@Test
- public void testFailure_incorrectClientIpv6Address() throws Exception {
+ public void testFailure_incorrectClientIpv6Address() {
persistResource(
getRegistrarBuilder()
.setIpAddressWhitelist(ImmutableList.of(
diff --git a/javatests/google/registry/keyring/kms/KmsKeyringTest.java b/javatests/google/registry/keyring/kms/KmsKeyringTest.java
index 47eb5de37..3b64134d7 100644
--- a/javatests/google/registry/keyring/kms/KmsKeyringTest.java
+++ b/javatests/google/registry/keyring/kms/KmsKeyringTest.java
@@ -24,7 +24,6 @@ import google.registry.model.server.KmsSecretRevision;
import google.registry.model.server.KmsSecretRevision.Builder;
import google.registry.testing.AppEngineRule;
import google.registry.testing.BouncyCastleProviderRule;
-import java.io.IOException;
import org.bouncycastle.openpgp.PGPKeyPair;
import org.bouncycastle.openpgp.PGPPrivateKey;
import org.bouncycastle.openpgp.PGPPublicKey;
@@ -112,7 +111,7 @@ public class KmsKeyringTest {
}
@Test
- public void test_getRdeSshClientPublicKey() throws Exception {
+ public void test_getRdeSshClientPublicKey() {
saveCleartextSecret("rde-ssh-client-public-string");
String rdeSshClientPublicKey = keyring.getRdeSshClientPublicKey();
@@ -121,7 +120,7 @@ public class KmsKeyringTest {
}
@Test
- public void test_getRdeSshClientPrivateKey() throws Exception {
+ public void test_getRdeSshClientPrivateKey() {
saveCleartextSecret("rde-ssh-client-private-string");
String rdeSshClientPrivateKey = keyring.getRdeSshClientPrivateKey();
@@ -130,7 +129,7 @@ public class KmsKeyringTest {
}
@Test
- public void test_getIcannReportingPassword() throws Exception {
+ public void test_getIcannReportingPassword() {
saveCleartextSecret("icann-reporting-password-string");
String icannReportingPassword = keyring.getIcannReportingPassword();
@@ -139,7 +138,7 @@ public class KmsKeyringTest {
}
@Test
- public void test_getMarksdbDnlLogin() throws Exception {
+ public void test_getMarksdbDnlLogin() {
saveCleartextSecret("marksdb-dnl-login-string");
String marksdbDnlLogin = keyring.getMarksdbDnlLogin();
@@ -148,7 +147,7 @@ public class KmsKeyringTest {
}
@Test
- public void test_getMarksdbLordnPassword() throws Exception {
+ public void test_getMarksdbLordnPassword() {
saveCleartextSecret("marksdb-lordn-password-string");
String marksdbLordnPassword = keyring.getMarksdbLordnPassword();
@@ -157,7 +156,7 @@ public class KmsKeyringTest {
}
@Test
- public void test_getMarksdbSmdrlLogin() throws Exception {
+ public void test_getMarksdbSmdrlLogin() {
saveCleartextSecret("marksdb-smdrl-login-string");
String marksdbSmdrlLogin = keyring.getMarksdbSmdrlLogin();
@@ -167,7 +166,7 @@ public class KmsKeyringTest {
}
@Test
- public void test_getJsonCredential() throws Exception {
+ public void test_getJsonCredential() {
saveCleartextSecret("json-credential-string");
String jsonCredential = keyring.getJsonCredential();
@@ -176,7 +175,7 @@ public class KmsKeyringTest {
}
@Test
- public void test_getBraintreePrivateKey() throws Exception {
+ public void test_getBraintreePrivateKey() {
saveCleartextSecret("braintree-private-key-string");
String braintreePrivateKey = keyring.getBraintreePrivateKey();
@@ -184,7 +183,7 @@ public class KmsKeyringTest {
assertThat(braintreePrivateKey).isEqualTo("braintree-private-key-stringmoo");
}
- private static void persistSecret(String secretName, byte[] secretValue) throws IOException {
+ private static void persistSecret(String secretName, byte[] secretValue) {
KmsConnection kmsConnection = new FakeKmsConnection();
KmsSecretRevision secretRevision =
@@ -197,7 +196,7 @@ public class KmsKeyringTest {
persistResources(ImmutableList.of(secretRevision, secret));
}
- private static void saveCleartextSecret(String secretName) throws Exception {
+ private static void saveCleartextSecret(String secretName) {
persistSecret(secretName, KeySerializer.serializeString(secretName + "moo"));
}
diff --git a/javatests/google/registry/keyring/kms/KmsUpdaterTest.java b/javatests/google/registry/keyring/kms/KmsUpdaterTest.java
index 5324019f2..9bc70ba3b 100644
--- a/javatests/google/registry/keyring/kms/KmsUpdaterTest.java
+++ b/javatests/google/registry/keyring/kms/KmsUpdaterTest.java
@@ -48,7 +48,7 @@ public class KmsUpdaterTest {
}
@Test
- public void test_setMultipleSecrets() throws Exception {
+ public void test_setMultipleSecrets() {
updater
.setBraintreePrivateKey("value1")
.setIcannReportingPassword("value2")
@@ -68,7 +68,7 @@ public class KmsUpdaterTest {
}
@Test
- public void test_setBraintreePrivateKey() throws Exception {
+ public void test_setBraintreePrivateKey() {
updater.setBraintreePrivateKey("value1").update();
verifySecretAndSecretRevisionWritten(
@@ -102,7 +102,7 @@ public class KmsUpdaterTest {
}
@Test
- public void test_setIcannReportingPassword() throws Exception {
+ public void test_setIcannReportingPassword() {
updater.setIcannReportingPassword("value1").update();
verifySecretAndSecretRevisionWritten(
@@ -112,7 +112,7 @@ public class KmsUpdaterTest {
}
@Test
- public void test_setJsonCredential() throws Exception {
+ public void test_setJsonCredential() {
updater.setJsonCredential("value1").update();
verifySecretAndSecretRevisionWritten(
@@ -120,7 +120,7 @@ public class KmsUpdaterTest {
}
@Test
- public void test_setMarksdbDnlLogin() throws Exception {
+ public void test_setMarksdbDnlLogin() {
updater.setMarksdbDnlLogin("value1").update();
verifySecretAndSecretRevisionWritten(
@@ -128,7 +128,7 @@ public class KmsUpdaterTest {
}
@Test
- public void test_setMarksdbLordnPassword() throws Exception {
+ public void test_setMarksdbLordnPassword() {
updater.setMarksdbLordnPassword("value1").update();
verifySecretAndSecretRevisionWritten(
@@ -138,7 +138,7 @@ public class KmsUpdaterTest {
}
@Test
- public void test_setMarksdbSmdrlLogin() throws Exception {
+ public void test_setMarksdbSmdrlLogin() {
updater.setMarksdbSmdrlLogin("value1").update();
verifySecretAndSecretRevisionWritten(
@@ -171,7 +171,7 @@ public class KmsUpdaterTest {
}
@Test
- public void test_setRdeSshClientPrivateKey() throws Exception {
+ public void test_setRdeSshClientPrivateKey() {
updater.setRdeSshClientPrivateKey("value1").update();
verifySecretAndSecretRevisionWritten(
@@ -181,7 +181,7 @@ public class KmsUpdaterTest {
}
@Test
- public void test_setRdeSshClientPublicKey() throws Exception {
+ public void test_setRdeSshClientPublicKey() {
updater.setRdeSshClientPublicKey("value1").update();
verifySecretAndSecretRevisionWritten(
@@ -215,11 +215,11 @@ public class KmsUpdaterTest {
assertThat(secretRevision.getEncryptedValue()).isEqualTo(expectedEncryptedValue);
}
- private static String getCiphertext(byte[] plaintext) throws IOException {
+ private static String getCiphertext(byte[] plaintext) {
return new FakeKmsConnection().encrypt("blah", plaintext).ciphertext();
}
- private static String getCiphertext(String plaintext) throws IOException {
+ private static String getCiphertext(String plaintext) {
return getCiphertext(KeySerializer.serializeString(plaintext));
}
diff --git a/javatests/google/registry/model/common/TimedTransitionPropertyTest.java b/javatests/google/registry/model/common/TimedTransitionPropertyTest.java
index bc7de3d13..fd32f0e4f 100644
--- a/javatests/google/registry/model/common/TimedTransitionPropertyTest.java
+++ b/javatests/google/registry/model/common/TimedTransitionPropertyTest.java
@@ -94,7 +94,7 @@ public class TimedTransitionPropertyTest {
}
@Test
- public void testSuccess_getValueAtTime() throws Exception {
+ public void testSuccess_getValueAtTime() {
testGetValueAtTime(timedString);
}
@@ -110,7 +110,7 @@ public class TimedTransitionPropertyTest {
}
@Test
- public void testSuccess_simulatedLoad() throws Exception {
+ public void testSuccess_simulatedLoad() {
// Just for testing, don't extract transitions from a TimedTransitionProperty in real code.
Set> transitions = timedString.entrySet();
timedString = forMapify("0", StringTimedTransition.class);
diff --git a/javatests/google/registry/model/ofy/OfyFilterTest.java b/javatests/google/registry/model/ofy/OfyFilterTest.java
index ec2cf6e2b..6768e4bd2 100644
--- a/javatests/google/registry/model/ofy/OfyFilterTest.java
+++ b/javatests/google/registry/model/ofy/OfyFilterTest.java
@@ -82,7 +82,7 @@ public class OfyFilterTest {
/** The filter should register all types for us. */
@Test
- public void testKeyCreateAfterFilter() throws Exception {
+ public void testKeyCreateAfterFilter() {
new OfyFilter().init(null);
ContactResource contact = newContactResource("contact1234");
Key.create(contact);
diff --git a/javatests/google/registry/model/registry/label/PremiumListUtilsTest.java b/javatests/google/registry/model/registry/label/PremiumListUtilsTest.java
index c093ba87b..ae8ea06d2 100644
--- a/javatests/google/registry/model/registry/label/PremiumListUtilsTest.java
+++ b/javatests/google/registry/model/registry/label/PremiumListUtilsTest.java
@@ -117,7 +117,7 @@ public class PremiumListUtilsTest {
}
@Test
- public void testSave_largeNumberOfEntries_succeeds() throws Exception {
+ public void testSave_largeNumberOfEntries_succeeds() {
PremiumList premiumList = persistHumongousPremiumList("tld", 2500);
assertThat(loadPremiumListEntries(premiumList)).hasSize(2500);
assertThat(getPremiumPrice("7", Registry.get("tld"))).hasValue(Money.parse("USD 100"));
@@ -258,7 +258,7 @@ public class PremiumListUtilsTest {
}
@Test
- public void testGetPremiumPrice_allLabelsAreNonPremium_whenNotInList() throws Exception {
+ public void testGetPremiumPrice_allLabelsAreNonPremium_whenNotInList() {
assertThat(getPremiumPrice("blah", Registry.get("tld"))).isEmpty();
assertThat(getPremiumPrice("slinge", Registry.get("tld"))).isEmpty();
assertMetricOutcomeCount(2, BLOOM_FILTER_NEGATIVE);
diff --git a/javatests/google/registry/monitoring/whitebox/BigQueryMetricsEnqueuerTest.java b/javatests/google/registry/monitoring/whitebox/BigQueryMetricsEnqueuerTest.java
index 19a533793..bde1405a0 100644
--- a/javatests/google/registry/monitoring/whitebox/BigQueryMetricsEnqueuerTest.java
+++ b/javatests/google/registry/monitoring/whitebox/BigQueryMetricsEnqueuerTest.java
@@ -67,7 +67,7 @@ public class BigQueryMetricsEnqueuerTest {
}
@Test
- public void testExport() throws Exception {
+ public void testExport() {
TestMetric metric =
TestMetric.create(
DateTime.parse("1984-12-18TZ"), DateTime.parse("1984-12-18TZ").plusMillis(1));
diff --git a/javatests/google/registry/rde/RdeStagingActionTest.java b/javatests/google/registry/rde/RdeStagingActionTest.java
index 444c25706..c612ce750 100644
--- a/javatests/google/registry/rde/RdeStagingActionTest.java
+++ b/javatests/google/registry/rde/RdeStagingActionTest.java
@@ -187,14 +187,14 @@ public class RdeStagingActionTest extends MapreduceTestCase {
}
@Test
- public void testRun_noTlds_returns204() throws Exception {
+ public void testRun_noTlds_returns204() {
action.run();
assertThat(response.getStatus()).isEqualTo(204);
assertNoTasksEnqueued("mapreduce");
}
@Test
- public void testRun_tldWithoutEscrowEnabled_returns204() throws Exception {
+ public void testRun_tldWithoutEscrowEnabled_returns204() {
createTld("lol");
persistResource(Registry.get("lol").asBuilder().setEscrowEnabled(false).build());
clock.setTo(DateTime.parse("2000-01-01TZ"));
@@ -204,7 +204,7 @@ public class RdeStagingActionTest extends MapreduceTestCase {
}
@Test
- public void testRun_tldWithEscrowEnabled_runsMapReduce() throws Exception {
+ public void testRun_tldWithEscrowEnabled_runsMapReduce() {
createTldWithEscrowEnabled("lol");
clock.setTo(DateTime.parse("2000-01-01TZ"));
action.run();
@@ -214,7 +214,7 @@ public class RdeStagingActionTest extends MapreduceTestCase {
}
@Test
- public void testRun_withinTransactionCooldown_getsExcludedAndReturns204() throws Exception {
+ public void testRun_withinTransactionCooldown_getsExcludedAndReturns204() {
createTldWithEscrowEnabled("lol");
clock.setTo(DateTime.parse("2000-01-01T00:04:59Z"));
action.transactionCooldown = Duration.standardMinutes(5);
@@ -224,7 +224,7 @@ public class RdeStagingActionTest extends MapreduceTestCase {
}
@Test
- public void testRun_afterTransactionCooldown_runsMapReduce() throws Exception {
+ public void testRun_afterTransactionCooldown_runsMapReduce() {
createTldWithEscrowEnabled("lol");
clock.setTo(DateTime.parse("2000-01-01T00:05:00Z"));
action.transactionCooldown = Duration.standardMinutes(5);
@@ -306,7 +306,7 @@ public class RdeStagingActionTest extends MapreduceTestCase {
}
@Test
- public void testManualRun_validParameters_runsMapReduce() throws Exception {
+ public void testManualRun_validParameters_runsMapReduce() {
createTldWithEscrowEnabled("lol");
clock.setTo(DateTime.parse("2000-01-01TZ"));
action.manual = true;
diff --git a/javatests/google/registry/rde/RdeUploadActionTest.java b/javatests/google/registry/rde/RdeUploadActionTest.java
index a2d60b7c2..ddf6b211f 100644
--- a/javatests/google/registry/rde/RdeUploadActionTest.java
+++ b/javatests/google/registry/rde/RdeUploadActionTest.java
@@ -264,7 +264,7 @@ public class RdeUploadActionTest {
}
@Test
- public void testRun() throws Exception {
+ public void testRun() {
createTld("lol");
RdeUploadAction action = createAction(null);
action.tld = "lol";
diff --git a/javatests/google/registry/rde/imports/RdeContactInputTest.java b/javatests/google/registry/rde/imports/RdeContactInputTest.java
index d1bf16db9..fb6ea0e9c 100644
--- a/javatests/google/registry/rde/imports/RdeContactInputTest.java
+++ b/javatests/google/registry/rde/imports/RdeContactInputTest.java
@@ -213,7 +213,7 @@ public class RdeContactInputTest {
Optional numberOfShards,
int whichReader,
int expectedOffset,
- int expectedMaxResults) throws Exception {
+ int expectedMaxResults) {
RdeContactInput input = getInput(numberOfShards);
List> readers = input.createReaders();
RdeContactReader reader = (RdeContactReader) readers.get(whichReader);
@@ -238,7 +238,7 @@ public class RdeContactInputTest {
* @param expectedNumberOfReaders Expected size of the list returned
*/
private void assertNumberOfReaders(Optional numberOfShards,
- int expectedNumberOfReaders) throws Exception {
+ int expectedNumberOfReaders) {
RdeContactInput input = getInput(numberOfShards);
List> readers = input.createReaders();
assertThat(readers).hasSize(expectedNumberOfReaders);
diff --git a/javatests/google/registry/rde/imports/RdeHostInputTest.java b/javatests/google/registry/rde/imports/RdeHostInputTest.java
index 098f87ea5..2dcfbf0d3 100644
--- a/javatests/google/registry/rde/imports/RdeHostInputTest.java
+++ b/javatests/google/registry/rde/imports/RdeHostInputTest.java
@@ -220,8 +220,10 @@ public class RdeHostInputTest {
* @param expectedMaxResults Expected maxResults of the reader
*/
private void assertReaderConfigurations(
- Optional numberOfShards, int whichReader, int expectedOffset, int expectedMaxResults)
- throws Exception {
+ Optional numberOfShards,
+ int whichReader,
+ int expectedOffset,
+ int expectedMaxResults) {
RdeHostInput input = getInput(numberOfShards);
List> readers = input.createReaders();
RdeHostReader reader = (RdeHostReader) readers.get(whichReader);
@@ -245,8 +247,8 @@ public class RdeHostInputTest {
* @param numberOfShards Number of desired shards ({@link Optional#empty} uses default of 50)
* @param expectedNumberOfReaders Expected size of the list returned
*/
- private void assertNumberOfReaders(Optional numberOfShards, int expectedNumberOfReaders)
- throws Exception {
+ private void assertNumberOfReaders(
+ Optional numberOfShards, int expectedNumberOfReaders) {
RdeHostInput input = getInput(numberOfShards);
List> readers = input.createReaders();
assertThat(readers).hasSize(expectedNumberOfReaders);
diff --git a/javatests/google/registry/reporting/billing/PublishInvoicesActionTest.java b/javatests/google/registry/reporting/billing/PublishInvoicesActionTest.java
index dcdd4186d..912ec1fe1 100644
--- a/javatests/google/registry/reporting/billing/PublishInvoicesActionTest.java
+++ b/javatests/google/registry/reporting/billing/PublishInvoicesActionTest.java
@@ -76,7 +76,7 @@ public class PublishInvoicesActionTest {
}
@Test
- public void testJobDone_enqueuesCopyAction_emailsResults() throws Exception {
+ public void testJobDone_enqueuesCopyAction_emailsResults() {
expectedJob.setCurrentState("JOB_STATE_DONE");
uploadAction.run();
assertThat(response.getStatus()).isEqualTo(SC_OK);
diff --git a/javatests/google/registry/reporting/icann/ActivityReportingQueryBuilderTest.java b/javatests/google/registry/reporting/icann/ActivityReportingQueryBuilderTest.java
index a751eb624..a4f338f69 100644
--- a/javatests/google/registry/reporting/icann/ActivityReportingQueryBuilderTest.java
+++ b/javatests/google/registry/reporting/icann/ActivityReportingQueryBuilderTest.java
@@ -18,7 +18,6 @@ import static com.google.common.truth.Truth.assertThat;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
-import java.io.IOException;
import org.joda.time.YearMonth;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -36,7 +35,7 @@ public class ActivityReportingQueryBuilderTest {
}
@Test
- public void testAggregateQueryMatch() throws IOException {
+ public void testAggregateQueryMatch() {
ActivityReportingQueryBuilder queryBuilder = getQueryBuilder();
assertThat(queryBuilder.getReportQuery())
.isEqualTo(
@@ -45,7 +44,7 @@ public class ActivityReportingQueryBuilderTest {
}
@Test
- public void testIntermediaryQueryMatch() throws IOException {
+ public void testIntermediaryQueryMatch() {
ImmutableList expectedQueryNames =
ImmutableList.of(
ActivityReportingQueryBuilder.REGISTRAR_OPERATING_STATUS,
diff --git a/javatests/google/registry/reporting/icann/IcannReportingStagingActionTest.java b/javatests/google/registry/reporting/icann/IcannReportingStagingActionTest.java
index f4372ff61..b068e8f6c 100644
--- a/javatests/google/registry/reporting/icann/IcannReportingStagingActionTest.java
+++ b/javatests/google/registry/reporting/icann/IcannReportingStagingActionTest.java
@@ -60,7 +60,7 @@ public class IcannReportingStagingActionTest {
when(stager.stageReports(ReportType.TRANSACTIONS)).thenReturn(ImmutableList.of("c", "d"));
}
- private static void assertUploadTaskEnqueued(String subDir) throws Exception {
+ private static void assertUploadTaskEnqueued(String subDir) {
TaskMatcher matcher =
new TaskMatcher()
.url("/_dr/task/icannReportingUpload")
diff --git a/javatests/google/registry/reporting/icann/TransactionsReportingQueryBuilderTest.java b/javatests/google/registry/reporting/icann/TransactionsReportingQueryBuilderTest.java
index 9c7ec7149..d650c9810 100644
--- a/javatests/google/registry/reporting/icann/TransactionsReportingQueryBuilderTest.java
+++ b/javatests/google/registry/reporting/icann/TransactionsReportingQueryBuilderTest.java
@@ -18,7 +18,6 @@ import static com.google.common.truth.Truth.assertThat;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
-import java.io.IOException;
import org.joda.time.YearMonth;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -36,7 +35,7 @@ public class TransactionsReportingQueryBuilderTest {
}
@Test
- public void testAggregateQueryMatch() throws IOException {
+ public void testAggregateQueryMatch() {
TransactionsReportingQueryBuilder queryBuilder = getQueryBuilder();
assertThat(queryBuilder.getReportQuery())
.isEqualTo(
@@ -45,7 +44,7 @@ public class TransactionsReportingQueryBuilderTest {
}
@Test
- public void testIntermediaryQueryMatch() throws IOException {
+ public void testIntermediaryQueryMatch() {
ImmutableList expectedQueryNames =
ImmutableList.of(
TransactionsReportingQueryBuilder.TRANSACTIONS_REPORT_AGGREGATION,
diff --git a/javatests/google/registry/testing/TaskQueueHelper.java b/javatests/google/registry/testing/TaskQueueHelper.java
index 4737115b7..6ff8084d1 100644
--- a/javatests/google/registry/testing/TaskQueueHelper.java
+++ b/javatests/google/registry/testing/TaskQueueHelper.java
@@ -202,14 +202,12 @@ public class TaskQueueHelper {
}
/** Ensures that the tasks in the named queue are exactly those with the expected names. */
- public static void assertTasksEnqueued(String queueName, String... expectedTaskNames)
- throws Exception {
+ public static void assertTasksEnqueued(String queueName, String... expectedTaskNames) {
Function nameGetter = TaskStateInfo::getTaskName;
assertTasksEnqueuedWithProperty(queueName, nameGetter, expectedTaskNames);
}
- public static void assertTasksEnqueued(String queueName, Iterable taskStateInfos)
- throws Exception {
+ public static void assertTasksEnqueued(String queueName, Iterable taskStateInfos) {
ImmutableList.Builder taskMatchers = new ImmutableList.Builder<>();
for (TaskStateInfo taskStateInfo : taskStateInfos) {
taskMatchers.add(new TaskMatcher(taskStateInfo));
@@ -221,8 +219,7 @@ public class TaskQueueHelper {
* Ensures that the only tasks in the named queue are exactly those that match the expected
* matchers.
*/
- public static void assertTasksEnqueued(String queueName, TaskMatcher... taskMatchers)
- throws Exception {
+ public static void assertTasksEnqueued(String queueName, TaskMatcher... taskMatchers) {
assertTasksEnqueued(queueName, Arrays.asList(taskMatchers));
}
@@ -290,7 +287,7 @@ public class TaskQueueHelper {
}
/** Ensures that the DNS queue tasks are exactly those for the expected target names. */
- public static void assertDnsTasksEnqueued(String... expectedTaskTargetNames) throws Exception {
+ public static void assertDnsTasksEnqueued(String... expectedTaskTargetNames) {
assertTasksEnqueuedWithProperty(
DnsConstants.DNS_PULL_QUEUE_NAME,
taskStateInfo -> getParamFromTaskInfo(taskStateInfo, DnsConstants.DNS_TARGET_NAME_PARAM),
@@ -298,7 +295,7 @@ public class TaskQueueHelper {
}
/** Ensures that the DNS queue does not contain any tasks. */
- public static void assertNoDnsTasksEnqueued() throws Exception {
+ public static void assertNoDnsTasksEnqueued() {
assertNoTasksEnqueued(DnsConstants.DNS_PULL_QUEUE_NAME);
}
diff --git a/javatests/google/registry/tmch/LordnTaskTest.java b/javatests/google/registry/tmch/LordnTaskTest.java
index fd96e936d..ad0fd6032 100644
--- a/javatests/google/registry/tmch/LordnTaskTest.java
+++ b/javatests/google/registry/tmch/LordnTaskTest.java
@@ -108,7 +108,7 @@ public class LordnTaskTest {
}
@Test
- public void test_enqueueDomainResourceTask_sunrise() throws Exception {
+ public void test_enqueueDomainResourceTask_sunrise() {
DomainResource domain = newDomainBuilder(DateTime.parse("2010-05-01T10:11:12Z"))
.setRepoId("A-EXAMPLE")
.build();
@@ -120,7 +120,7 @@ public class LordnTaskTest {
}
@Test
- public void test_enqueueDomainResourceTask_claims() throws Exception {
+ public void test_enqueueDomainResourceTask_claims() {
DateTime time = DateTime.parse("2010-05-01T10:11:12Z");
DomainResource domain = newDomainBuilder(time)
.setRepoId("11-EXAMPLE")
@@ -134,7 +134,7 @@ public class LordnTaskTest {
}
@Test
- public void test_oteRegistrarWithNullIanaId() throws Exception {
+ public void test_oteRegistrarWithNullIanaId() {
ofy()
.transact(
() ->
diff --git a/javatests/google/registry/tmch/NordnUploadActionTest.java b/javatests/google/registry/tmch/NordnUploadActionTest.java
index 4817a581d..1295d7bf7 100644
--- a/javatests/google/registry/tmch/NordnUploadActionTest.java
+++ b/javatests/google/registry/tmch/NordnUploadActionTest.java
@@ -165,7 +165,7 @@ public class NordnUploadActionTest {
}
@Test
- public void testRun_claimsMode_verifyTaskGetsEnqueuedWithClaimsCsv() throws Exception {
+ public void testRun_claimsMode_verifyTaskGetsEnqueuedWithClaimsCsv() {
persistClaimsModeDomain();
action.run();
assertTasksEnqueued(NordnVerifyAction.QUEUE, new TaskMatcher()
@@ -182,7 +182,7 @@ public class NordnUploadActionTest {
}
@Test
- public void testRun_sunriseMode_verifyTaskGetsEnqueuedWithSunriseCsv() throws Exception {
+ public void testRun_sunriseMode_verifyTaskGetsEnqueuedWithSunriseCsv() {
persistSunriseModeDomain();
action.run();
assertTasksEnqueued(NordnVerifyAction.QUEUE, new TaskMatcher()
diff --git a/javatests/google/registry/tools/CreateReservedListCommandTest.java b/javatests/google/registry/tools/CreateReservedListCommandTest.java
index a31e23850..6ca3940c5 100644
--- a/javatests/google/registry/tools/CreateReservedListCommandTest.java
+++ b/javatests/google/registry/tools/CreateReservedListCommandTest.java
@@ -109,7 +109,7 @@ public class CreateReservedListCommandTest extends
}
@Test
- public void testNamingRules_tldThatDoesNotExist_failsWithoutOverride() throws Exception {
+ public void testNamingRules_tldThatDoesNotExist_failsWithoutOverride() {
runNameTestExpectedFailure("footld_reserved-list", "TLD footld does not exist");
}
@@ -119,7 +119,7 @@ public class CreateReservedListCommandTest extends
}
@Test
- public void testNamingRules_underscoreIsMissing_failsWithoutOverride() throws Exception {
+ public void testNamingRules_underscoreIsMissing_failsWithoutOverride() {
runNameTestExpectedFailure("random-reserved-list", INVALID_FORMAT_ERROR_MESSAGE);
}
@@ -129,7 +129,7 @@ public class CreateReservedListCommandTest extends
}
@Test
- public void testNamingRules_secondHalfOfNameIsMissing_failsWithoutOverride() throws Exception {
+ public void testNamingRules_secondHalfOfNameIsMissing_failsWithoutOverride() {
runNameTestExpectedFailure("soy_", INVALID_FORMAT_ERROR_MESSAGE);
}
@@ -139,7 +139,7 @@ public class CreateReservedListCommandTest extends
}
@Test
- public void testNamingRules_onlyTldIsSpecifiedAsName_failsWithoutOverride() throws Exception {
+ public void testNamingRules_onlyTldIsSpecifiedAsName_failsWithoutOverride() {
runNameTestExpectedFailure("soy", INVALID_FORMAT_ERROR_MESSAGE);
}
@@ -149,7 +149,7 @@ public class CreateReservedListCommandTest extends
}
@Test
- public void testNamingRules_commonAsListName_failsWithoutOverride() throws Exception {
+ public void testNamingRules_commonAsListName_failsWithoutOverride() {
runNameTestExpectedFailure("invalidtld_common", "TLD invalidtld does not exist");
}
@@ -159,7 +159,7 @@ public class CreateReservedListCommandTest extends
}
@Test
- public void testNamingRules_too_many_underscores_failsWithoutOverride() throws Exception {
+ public void testNamingRules_too_many_underscores_failsWithoutOverride() {
runNameTestExpectedFailure("soy_buffalo_buffalo_buffalo", INVALID_FORMAT_ERROR_MESSAGE);
}
@@ -169,7 +169,7 @@ public class CreateReservedListCommandTest extends
}
@Test
- public void testNamingRules_withWeirdCharacters_failsWithoutOverride() throws Exception {
+ public void testNamingRules_withWeirdCharacters_failsWithoutOverride() {
runNameTestExpectedFailure("soy_$oy", INVALID_FORMAT_ERROR_MESSAGE);
}
diff --git a/javatests/google/registry/tools/CreateTldCommandTest.java b/javatests/google/registry/tools/CreateTldCommandTest.java
index 17e81f5fc..49564ecb8 100644
--- a/javatests/google/registry/tools/CreateTldCommandTest.java
+++ b/javatests/google/registry/tools/CreateTldCommandTest.java
@@ -514,7 +514,7 @@ public class CreateTldCommandTest extends CommandTestCase {
}
@Test
- public void testFailure_setReservedListFromOtherTld() throws Exception {
+ public void testFailure_setReservedListFromOtherTld() {
runFailureReservedListsTest(
"tld_banned",
IllegalArgumentException.class,
@@ -527,7 +527,7 @@ public class CreateTldCommandTest extends CommandTestCase {
}
@Test
- public void testFailure_setCommonAndReservedListFromOtherTld() throws Exception {
+ public void testFailure_setCommonAndReservedListFromOtherTld() {
runFailureReservedListsTest(
"common_abuse,tld_banned",
IllegalArgumentException.class,
@@ -547,7 +547,7 @@ public class CreateTldCommandTest extends CommandTestCase {
}
@Test
- public void testFailure_setMultipleReservedListsFromOtherTld() throws Exception {
+ public void testFailure_setMultipleReservedListsFromOtherTld() {
runFailureReservedListsTest(
"tld_banned,soy_expurgated",
IllegalArgumentException.class,
@@ -560,7 +560,7 @@ public class CreateTldCommandTest extends CommandTestCase {
}
@Test
- public void testFailure_setNonExistentReservedLists() throws Exception {
+ public void testFailure_setNonExistentReservedLists() {
runFailureReservedListsTest(
"xn--q9jyb4c_asdf,common_asdsdgh",
IllegalArgumentException.class,
diff --git a/javatests/google/registry/tools/UpdateTldCommandTest.java b/javatests/google/registry/tools/UpdateTldCommandTest.java
index 5d95f8641..9e9e0f5d8 100644
--- a/javatests/google/registry/tools/UpdateTldCommandTest.java
+++ b/javatests/google/registry/tools/UpdateTldCommandTest.java
@@ -940,7 +940,7 @@ public class UpdateTldCommandTest extends CommandTestCase {
}
@Test
- public void testFailure_setReservedListFromOtherTld() throws Exception {
+ public void testFailure_setReservedListFromOtherTld() {
runFailureReservedListsTest("tld_banned",
IllegalArgumentException.class,
"The reserved list(s) tld_banned cannot be applied to the tld xn--q9jyb4c");
@@ -952,7 +952,7 @@ public class UpdateTldCommandTest extends CommandTestCase {
}
@Test
- public void testFailure_setCommonAndReservedListFromOtherTld() throws Exception {
+ public void testFailure_setCommonAndReservedListFromOtherTld() {
runFailureReservedListsTest("common_abuse,tld_banned",
IllegalArgumentException.class,
"The reserved list(s) tld_banned cannot be applied to the tld xn--q9jyb4c");
@@ -971,7 +971,7 @@ public class UpdateTldCommandTest extends CommandTestCase {
}
@Test
- public void testFailure_setMultipleReservedListsFromOtherTld() throws Exception {
+ public void testFailure_setMultipleReservedListsFromOtherTld() {
runFailureReservedListsTest("tld_banned,soy_expurgated",
IllegalArgumentException.class,
"The reserved list(s) tld_banned, soy_expurgated cannot be applied to the tld xn--q9jyb4c");
diff --git a/javatests/google/registry/ui/server/registrar/RegistrarSettingsActionTest.java b/javatests/google/registry/ui/server/registrar/RegistrarSettingsActionTest.java
index db81faa8a..71dc6d7c3 100644
--- a/javatests/google/registry/ui/server/registrar/RegistrarSettingsActionTest.java
+++ b/javatests/google/registry/ui/server/registrar/RegistrarSettingsActionTest.java
@@ -70,7 +70,7 @@ public class RegistrarSettingsActionTest extends RegistrarSettingsActionTestCase
}
@Test
- public void testFailure_updateRegistrarInfo_duplicateContacts() throws Exception {
+ public void testFailure_updateRegistrarInfo_duplicateContacts() {
Map response = action.handleJsonRequest(
readJsonFromFile("update_registrar_duplicate_contacts.json", getLastUpdateTime()));
assertThat(response).containsExactly(
@@ -82,7 +82,7 @@ public class RegistrarSettingsActionTest extends RegistrarSettingsActionTestCase
}
@Test
- public void testRead_notAuthorized_failure() throws Exception {
+ public void testRead_notAuthorized_failure() {
when(sessionUtils.getRegistrarForAuthResult(
any(HttpServletRequest.class), any(AuthResult.class)))
.thenThrow(new ForbiddenException("Not authorized to access Registrar Console"));
@@ -103,7 +103,7 @@ public class RegistrarSettingsActionTest extends RegistrarSettingsActionTestCase
}
@Test
- public void testUpdate_emptyJsonObject_errorLastUpdateTimeFieldRequired() throws Exception {
+ public void testUpdate_emptyJsonObject_errorLastUpdateTimeFieldRequired() {
Map response = action.handleJsonRequest(ImmutableMap.of(
"op", "update",
"args", ImmutableMap.of()));
@@ -116,7 +116,7 @@ public class RegistrarSettingsActionTest extends RegistrarSettingsActionTestCase
}
@Test
- public void testUpdate_noEmail_errorEmailFieldRequired() throws Exception {
+ public void testUpdate_noEmail_errorEmailFieldRequired() {
Map response = action.handleJsonRequest(ImmutableMap.of(
"op", "update",
"args", ImmutableMap.of("lastUpdateTime", getLastUpdateTime())));
@@ -142,7 +142,7 @@ public class RegistrarSettingsActionTest extends RegistrarSettingsActionTestCase
}
@Test
- public void testUpdate_badEmail_errorEmailField() throws Exception {
+ public void testUpdate_badEmail_errorEmailField() {
Map response = action.handleJsonRequest(ImmutableMap.of(
"op", "update",
"args", ImmutableMap.of(
@@ -157,7 +157,7 @@ public class RegistrarSettingsActionTest extends RegistrarSettingsActionTestCase
}
@Test
- public void testPost_nonParsableTime_getsAngry() throws Exception {
+ public void testPost_nonParsableTime_getsAngry() {
Map response = action.handleJsonRequest(ImmutableMap.of(
"op", "update",
"args", ImmutableMap.of("lastUpdateTime", "cookies")));
@@ -170,7 +170,7 @@ public class RegistrarSettingsActionTest extends RegistrarSettingsActionTestCase
}
@Test
- public void testPost_nonAsciiCharacters_getsAngry() throws Exception {
+ public void testPost_nonAsciiCharacters_getsAngry() {
Map response = action.handleJsonRequest(ImmutableMap.of(
"op", "update",
"args", ImmutableMap.of(