Remove unnecessary type specifications

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=179585680
This commit is contained in:
mcilwain 2017-12-19 12:03:43 -08:00 committed by Ben McIlwain
parent f1ae66d148
commit ed0670b614
52 changed files with 193 additions and 221 deletions

View file

@ -101,8 +101,7 @@ public class EppControllerTest extends ShardableTestCase {
loggerToIntercept.addHandler(logHandler);
when(sessionMetadata.getClientId()).thenReturn("some-client");
when(flowComponentBuilder.flowModule(Matchers.<FlowModule>any()))
.thenReturn(flowComponentBuilder);
when(flowComponentBuilder.flowModule(Matchers.any())).thenReturn(flowComponentBuilder);
when(flowComponentBuilder.build()).thenReturn(flowComponent);
when(flowComponent.flowRunner()).thenReturn(flowRunner);
when(eppOutput.isResponse()).thenReturn(true);

View file

@ -86,7 +86,7 @@ public class EppLifecycleContactTest extends EppTestCase {
assertCommandAndResponse("login_valid.xml", "login_response.xml");
assertCommandAndResponse(
"contact_create_sh8013.xml",
ImmutableMap.<String, String>of(),
ImmutableMap.of(),
"contact_create_response_sh8013.xml",
ImmutableMap.of("CRDATE", "2000-06-01T00:00:00Z"),
DateTime.parse("2000-06-01T00:00:00Z"));

View file

@ -52,7 +52,7 @@ public class EppLifecycleDomainApplicationTest extends EppTestCase {
DateTime startTime = DateTime.parse("2000-06-01T00:00:00Z");
assertCommandAndResponse(
"contact_create_sh8013.xml",
ImmutableMap.<String, String>of(),
ImmutableMap.of(),
"contact_create_response_sh8013.xml",
ImmutableMap.of("CRDATE", "2000-06-01T00:00:00Z"),
startTime);

View file

@ -53,7 +53,7 @@ public class EppLifecycleDomainTest extends EppTestCase {
DateTime startTime = DateTime.parse("2000-06-01T00:00:00Z");
assertCommandAndResponse(
"contact_create_sh8013.xml",
ImmutableMap.<String, String>of(),
ImmutableMap.of(),
"contact_create_response_sh8013.xml",
ImmutableMap.of("CRDATE", "2000-06-01T00:00:00Z"),
startTime);

View file

@ -49,7 +49,7 @@ public class EppLifecycleHostTest extends EppTestCase {
assertCommandAndResponse("login_valid.xml", "login_response.xml");
assertCommandAndResponse(
"hello.xml",
ImmutableMap.<String, String>of(),
ImmutableMap.of(),
"greeting.xml",
ImmutableMap.of("DATE", "2000-06-02T00:00:00Z"),
DateTime.parse("2000-06-02T00:00:00Z"));
@ -78,7 +78,7 @@ public class EppLifecycleHostTest extends EppTestCase {
"host_info.xml",
ImmutableMap.of("HOSTNAME", "ns1.example.tld"),
"host_info_response.xml",
ImmutableMap.<String, String>of(
ImmutableMap.of(
"HOSTNAME", "ns1.example.tld", "ROID", "1-ROID", "CRDATE", "2000-06-02T00:01:00Z"),
DateTime.parse("2000-06-02T00:02:00Z"));
assertThat(getRecordedEppMetric())
@ -93,7 +93,7 @@ public class EppLifecycleHostTest extends EppTestCase {
"host_delete.xml",
ImmutableMap.of("HOSTNAME", "ns1.example.tld"),
"generic_success_action_pending_response.xml",
ImmutableMap.<String, String>of(),
ImmutableMap.of(),
DateTime.parse("2000-06-02T00:03:00Z"));
assertThat(getRecordedEppMetric())
.hasClientId("NewRegistrar")
@ -113,7 +113,7 @@ public class EppLifecycleHostTest extends EppTestCase {
// Create the fakesite domain.
assertCommandAndResponse(
"contact_create_sh8013.xml",
ImmutableMap.<String, String>of(),
ImmutableMap.of(),
"contact_create_response_sh8013.xml",
ImmutableMap.of("CRDATE", "2000-06-01T00:00:00Z"),
DateTime.parse("2000-06-01T00:00:00Z"));
@ -164,7 +164,7 @@ public class EppLifecycleHostTest extends EppTestCase {
assertCommandAndResponse(
"contact_create_sh8013.xml",
ImmutableMap.<String, String>of(),
ImmutableMap.of(),
"contact_create_response_sh8013.xml",
ImmutableMap.of("CRDATE", "2000-06-01T00:00:00Z"),
DateTime.parse("2000-06-01T00:00:00Z"));

View file

@ -137,7 +137,7 @@ public class FlowReporterTest extends ShardableTestCase {
@Test
public void testRecordToLogs_metadata_notResourceFlow_noResourceTypeOrTld() throws Exception {
when(flowReporter.eppInput.isDomainResourceType()).thenReturn(false);
when(flowReporter.eppInput.getResourceType()).thenReturn(Optional.<String>empty());
when(flowReporter.eppInput.getResourceType()).thenReturn(Optional.empty());
flowReporter.recordToLogs();
Map<String, Object> json =
parseJsonMap(findFirstLogMessageByPrefix(handler, "FLOW-LOG-SIGNATURE-METADATA: "));
@ -177,7 +177,7 @@ public class FlowReporterTest extends ShardableTestCase {
@Test
public void testRecordToLogs_metadata_multipleTargetIds_uniqueTldSet() throws Exception {
when(flowReporter.eppInput.isDomainResourceType()).thenReturn(true);
when(flowReporter.eppInput.getSingleTargetId()).thenReturn(Optional.<String>empty());
when(flowReporter.eppInput.getSingleTargetId()).thenReturn(Optional.empty());
when(flowReporter.eppInput.getTargetIds())
.thenReturn(ImmutableList.of("target.co.uk", "foo.uk", "bar.uk", "baz.com"));
flowReporter.recordToLogs();

View file

@ -79,7 +79,7 @@ public class FlowRunnerTest extends ShardableTestCase {
flowRunner.isSuperuser = false;
flowRunner.isTransactional = false;
flowRunner.sessionMetadata =
new StatelessRequestSessionMetadata("TheRegistrar", ImmutableSet.<String>of());
new StatelessRequestSessionMetadata("TheRegistrar", ImmutableSet.of());
flowRunner.trid = Trid.create("client-123", "server-456");
flowRunner.flowReporter = Mockito.mock(FlowReporter.class);
}

View file

@ -116,7 +116,7 @@ public abstract class FlowTestCase<F extends Flow> extends ShardableTestCase {
}
protected void setEppInput(String inputFilename) {
eppLoader = new EppLoader(this, inputFilename, ImmutableMap.<String, String>of());
eppLoader = new EppLoader(this, inputFilename, ImmutableMap.of());
}
protected void setEppInput(String inputFilename, Map<String, String> substitutions) {