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

@ -35,7 +35,7 @@ public class RdapMetricsTest {
private final RdapMetrics rdapMetrics = new RdapMetrics();
@Before
public void setUp() throws Exception {
public void setUp() {
RdapMetrics.requests.reset();
RdapMetrics.responses.reset();
RdapMetrics.numberOfDomainsRetrieved.reset();
@ -58,7 +58,7 @@ public class RdapMetricsTest {
}
@Test
public void testPost() throws Exception {
public void testPost() {
rdapMetrics.updateMetrics(getBuilder().setRequestMethod(Action.Method.POST).build());
assertThat(RdapMetrics.requests)
.hasValueForLabels(1, "DOMAINS", "NO", "NO", "PUBLIC", "POST")
@ -67,7 +67,7 @@ public class RdapMetricsTest {
}
@Test
public void testHead() throws Exception {
public void testHead() {
rdapMetrics.updateMetrics(getBuilder().setRequestMethod(Action.Method.HEAD).build());
assertThat(RdapMetrics.requests)
.hasValueForLabels(1, "DOMAINS", "NO", "NO", "PUBLIC", "HEAD")
@ -76,7 +76,7 @@ public class RdapMetricsTest {
}
@Test
public void testPrefixLength_cappedAt5() throws Exception {
public void testPrefixLength_cappedAt5() {
rdapMetrics.updateMetrics(
getBuilder().setPrefixLength(6).setNumDomainsRetrieved(1).build());
assertThat(RdapMetrics.numberOfDomainsRetrieved)
@ -86,7 +86,7 @@ public class RdapMetricsTest {
}
@Test
public void testIncludeDeleted() throws Exception {
public void testIncludeDeleted() {
rdapMetrics.updateMetrics(getBuilder().setIncludeDeleted(true).build());
assertThat(RdapMetrics.requests)
.hasValueForLabels(1, "DOMAINS", "YES", "NO", "PUBLIC", "GET")
@ -95,7 +95,7 @@ public class RdapMetricsTest {
}
@Test
public void testDesiredRegistrar() throws Exception {
public void testDesiredRegistrar() {
rdapMetrics.updateMetrics(getBuilder().setRegistrarSpecified(true).build());
assertThat(RdapMetrics.requests)
.hasValueForLabels(1, "DOMAINS", "NO", "YES", "PUBLIC", "GET")
@ -104,7 +104,7 @@ public class RdapMetricsTest {
}
@Test
public void testCompleteResultSet() throws Exception {
public void testCompleteResultSet() {
rdapMetrics.updateMetrics(
getBuilder()
.setIncompletenessWarningType(IncompletenessWarningType.COMPLETE)
@ -116,7 +116,7 @@ public class RdapMetricsTest {
}
@Test
public void testTruncatedResultSet() throws Exception {
public void testTruncatedResultSet() {
rdapMetrics.updateMetrics(
getBuilder()
.setIncompletenessWarningType(IncompletenessWarningType.TRUNCATED)
@ -128,7 +128,7 @@ public class RdapMetricsTest {
}
@Test
public void testPossiblyIncompleteResultSet() throws Exception {
public void testPossiblyIncompleteResultSet() {
rdapMetrics.updateMetrics(
getBuilder()
.setIncompletenessWarningType(IncompletenessWarningType.MIGHT_BE_INCOMPLETE)
@ -140,7 +140,7 @@ public class RdapMetricsTest {
}
@Test
public void testPublicRole() throws Exception {
public void testPublicRole() {
rdapMetrics.updateMetrics(getBuilder().setRole(RdapAuthorization.Role.PUBLIC).build());
assertThat(RdapMetrics.requests)
.hasValueForLabels(1, "DOMAINS", "NO", "NO", "PUBLIC", "GET")
@ -149,7 +149,7 @@ public class RdapMetricsTest {
}
@Test
public void testRegistrarRole() throws Exception {
public void testRegistrarRole() {
rdapMetrics.updateMetrics(getBuilder().setRole(RdapAuthorization.Role.REGISTRAR).build());
assertThat(RdapMetrics.requests)
.hasValueForLabels(1, "DOMAINS", "NO", "NO", "REGISTRAR", "GET")
@ -158,7 +158,7 @@ public class RdapMetricsTest {
}
@Test
public void testAdminRole() throws Exception {
public void testAdminRole() {
rdapMetrics.updateMetrics(getBuilder().setRole(RdapAuthorization.Role.ADMINISTRATOR).build());
assertThat(RdapMetrics.requests)
.hasValueForLabels(1, "DOMAINS", "NO", "NO", "ADMINISTRATOR", "GET")
@ -168,7 +168,7 @@ public class RdapMetricsTest {
/** Tests what would happen in a domain search for "cat.lol" which found that domain. */
@Test
public void testSimpleDomainSearch() throws Exception {
public void testSimpleDomainSearch() {
rdapMetrics.updateMetrics(
getBuilder()
.setSearchType(SearchType.BY_DOMAIN_NAME)
@ -199,7 +199,7 @@ public class RdapMetricsTest {
* deleted domains, which found 10 matching hosts, then looked for domains and found 5 matches.
*/
@Test
public void testDomainSearchByNameserverWithWildcardAndDeleted() throws Exception {
public void testDomainSearchByNameserverWithWildcardAndDeleted() {
rdapMetrics.updateMetrics(
getBuilder()
.setSearchType(SearchType.BY_NAMESERVER_NAME)
@ -233,7 +233,7 @@ public class RdapMetricsTest {
/** Tests what would happen in a nameserver search for "*.cat.lol", which found no matches. */
@Test
public void testNoNameserversFound() throws Exception {
public void testNoNameserversFound() {
rdapMetrics.updateMetrics(
getBuilder()
.setEndpointType(EndpointType.NAMESERVERS)
@ -262,7 +262,7 @@ public class RdapMetricsTest {
/** Tests what would happen in an entity search for "Mike*" which found 50 contacts. */
@Test
public void testEntitySearchByNameWithWildcard() throws Exception {
public void testEntitySearchByNameWithWildcard() {
rdapMetrics.updateMetrics(
getBuilder()
.setEndpointType(EndpointType.ENTITIES)