Remove unnecessary "throws" declarations

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=201058582
This commit is contained in:
mcilwain 2018-06-18 14:25:42 -07:00 committed by Ben McIlwain
parent a7256f5edd
commit 5d80f124ca
377 changed files with 2297 additions and 2373 deletions

View file

@ -33,7 +33,6 @@ import google.registry.testing.FakeClock;
import google.registry.testing.FakeSleeper;
import google.registry.util.Retrier;
import google.registry.util.StringGenerator.Alphabets;
import java.io.IOException;
import java.util.function.Function;
import javax.annotation.Nullable;
import org.joda.time.DateTime;
@ -46,7 +45,7 @@ public class GenerateAllocationTokensCommandTest
extends CommandTestCase<GenerateAllocationTokensCommand> {
@Before
public void init() throws IOException {
public void init() {
command.stringGenerator = new DeterministicStringGenerator(Alphabets.BASE_58);
command.retrier =
new Retrier(new FakeSleeper(new FakeClock(DateTime.parse("2000-01-01TZ"))), 3);
@ -117,13 +116,13 @@ public class GenerateAllocationTokensCommandTest
}
@Test
public void testFailure_mustSpecifyNumberOfTokens() throws Exception {
public void testFailure_mustSpecifyNumberOfTokens() {
ParameterException thrown =
assertThrows(ParameterException.class, () -> runCommand("--prefix", "FEET"));
assertThat(thrown).hasMessageThat().contains("The following option is required: -n, --number");
}
private void assertAllocationTokens(AllocationToken... expectedTokens) throws Exception {
private void assertAllocationTokens(AllocationToken... expectedTokens) {
// Using ImmutableObject comparison here is tricky because the creation/updated timestamps are
// neither easy nor valuable to test here.
ImmutableMap<String, AllocationToken> actualTokens =