### Question:
AwsRDSPlatform extends Platform { Boolean filterDBCluster (DBCluster dbCluster) { Collection<Tag> tags = generateTagsFromFilters(); if (tags.isEmpty()) return true; ListTagsForResourceResult listTagsForResourceResult = amazonRDS.listTagsForResource(new ListTagsForResourceRequest() .withResourceName(dbCluster.getDBClusterArn())); List<Tag> tagList = listTagsForResourceResult.getTagList(); return tagList.containsAll(tags); } @Autowired  AwsRDSPlatform();   AwsRDSPlatform(AmazonRDS amazonRDS, AmazonEC2 amazonEC2); Map<String, String> getVpcToSecurityGroupMap(); @Override ApiStatus getApiStatus(); @Override PlatformLevel getPlatformLevel(); @Override PlatformHealth getPlatformHealth(); @Override List<Container> generateExperimentRoster(); @Override boolean isContainerRecycled(Container container); Map<String, String> getFilter(); void setFilter(Map<String, String> filter); void failoverCluster(String dbClusterIdentifier); void restartInstance(String... dbInstanceIdentifiers); Set<String> getClusterInstances(String dbClusterIdentifier); ContainerHealth getInstanceStatus(String... dbInstanceIdentifiers); void setVpcSecurityGroupIds(String dbInstanceIdentifier, String vpcSecurityGroupId); void setVpcSecurityGroupIds(String dbInstanceIdentifier, Collection<String> vpcSecurityGroupIds); ContainerHealth checkVpcSecurityGroupIds(String dbInstanceIdentifier, Collection<String> vpcSecurityGroupIds); Collection<String> getVpcSecurityGroupIds(String dbInstanceIdentifier); String getChaosSecurityGroup(String dbInstanceIdentifier); DBSnapshot snapshotDBInstance(String dbInstanceIdentifier); DBClusterSnapshot snapshotDBCluster(String dbClusterIdentifier); void deleteInstanceSnapshot(DBSnapshot dbSnapshot); void deleteClusterSnapshot(DBClusterSnapshot dbClusterSnapshot); boolean isInstanceSnapshotRunning(String dbInstanceIdentifier); boolean isClusterSnapshotRunning(String dbClusterIdentifier);  }### Answer:
@Test public void filterDBCluster () { String dBClusterArn = randomUUID().toString(); awsRDSPlatform.setFilter(ImmutableMap.of("key", "value")); doReturn(new ListTagsForResourceResult().withTagList(new Tag().withKey("key") .withValue("value"))).when(amazonRDS) .listTagsForResource(new ListTagsForResourceRequest() .withResourceName(dBClusterArn)); assertTrue(awsRDSPlatform.filterDBCluster(new DBCluster().withDBClusterArn(dBClusterArn))); awsRDSPlatform.setFilter(ImmutableMap.of("k", "v")); assertFalse(awsRDSPlatform.filterDBCluster(new DBCluster().withDBClusterArn(dBClusterArn))); awsRDSPlatform.setFilter(ImmutableMap.of("key", "value", "k", "v")); assertFalse(awsRDSPlatform.filterDBCluster(new DBCluster().withDBClusterArn(dBClusterArn))); doReturn(new ListTagsForResourceResult().withTagList(new Tag().withKey("key") .withValue("value"), new Tag().withKey("k") .withValue("v"))).when(amazonRDS) .listTagsForResource(new ListTagsForResourceRequest() .withResourceName(dBClusterArn)); awsRDSPlatform.setFilter(ImmutableMap.of("key", "value")); assertTrue(awsRDSPlatform.filterDBCluster(new DBCluster().withDBClusterArn(dBClusterArn))); }