### Question:
AwsResource { public String getService() { return service; } AwsResource(String arn); String getArn(); String getResource(); String getService(); String getRegion(); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test public void getService_GivenFirehoseArn_ShouldReturnFirehose() { Assert.assertEquals("firehose", new AwsResource(firehoseArn).getService()); }
@Test public void getService_GivenRedshiftArn_ShouldReturnRedshift() { Assert.assertEquals("redshift", new AwsResource(redshiftArn).getService()); }
@Test public void getService_GivenLambdaArn_ShouldReturnLambda() { Assert.assertEquals("lambda", new AwsResource(lambdaArn).getService()); }
@Test public void getService_GivenStreamArn_ShouldReturnKinesis() { Assert.assertEquals("kinesis", new AwsResource(streamArn).getService()); }
@Test public void getService_GivenS3Arn_ShouldReturnS3() { Assert.assertEquals("s3", new AwsResource(s3Arn).getService()); }
@Test public void getService_GivenElasticsearchArn_ShouldReturnEs() { Assert.assertEquals("es", new AwsResource(elasticsearchArn).getService()); }