@Test public void testGoodValues() { assertEquals(CUSTOMER_GATEWAY, validator.getFilterValue(TagFilter.RESOURCE_TYPE, CUSTOMER_GATEWAY)); assertEquals(DHCP_OPTIONS, validator.getFilterValue(TagFilter.RESOURCE_TYPE, DHCP_OPTIONS)); assertEquals(IMAGE, validator.getFilterValue(TagFilter.RESOURCE_TYPE, IMAGE)); assertEquals(INSTANCE, validator.getFilterValue(TagFilter.RESOURCE_TYPE, INSTANCE)); assertEquals(INTERNET_GATEWAY, validator.getFilterValue(TagFilter.RESOURCE_TYPE, INTERNET_GATEWAY)); assertEquals(NETWORK_ACL, validator.getFilterValue(TagFilter.RESOURCE_TYPE, NETWORK_ACL)); assertEquals(NETWORK_INTERFACE, validator.getFilterValue(TagFilter.RESOURCE_TYPE, NETWORK_INTERFACE)); assertEquals(RESERVED_INSTANCES, validator.getFilterValue(TagFilter.RESOURCE_TYPE, RESERVED_INSTANCES)); assertEquals(ROUTE_TABLE, validator.getFilterValue(TagFilter.RESOURCE_TYPE, ROUTE_TABLE)); assertEquals(SECURITY_GROUP, validator.getFilterValue(TagFilter.RESOURCE_TYPE, SECURITY_GROUP)); assertEquals(SNAPSHOT, validator.getFilterValue(TagFilter.RESOURCE_TYPE, SNAPSHOT)); assertEquals(SPOT_INSTANCES_REQUEST, validator.getFilterValue(TagFilter.RESOURCE_TYPE, SPOT_INSTANCES_REQUEST)); assertEquals(SUBNET, validator.getFilterValue(TagFilter.RESOURCE_TYPE, SUBNET)); assertEquals(VOLUME, validator.getFilterValue(TagFilter.RESOURCE_TYPE, VOLUME)); assertEquals(VPC, validator.getFilterValue(TagFilter.RESOURCE_TYPE, VPC)); assertEquals(VPN_CONNECTION, validator.getFilterValue(TagFilter.RESOURCE_TYPE, VPN_CONNECTION)); assertEquals(VPN_GATEWAY, validator.getFilterValue(TagFilter.RESOURCE_TYPE, VPN_GATEWAY)); }
@Override @NotNull public String getFilterValue(@NotNull final String filterName, @NotNull final String filterValue) { if(RESOURCE_TYPE.equals(filterName)) { return ResourceType.getValue(filterValue); } else { return filterValue; } }
TagFilterValidator implements FilterValidator { @Override @NotNull public String getFilterValue(@NotNull final String filterName, @NotNull final String filterValue) { if(RESOURCE_TYPE.equals(filterName)) { return ResourceType.getValue(filterValue); } else { return filterValue; } } }
TagFilterValidator implements FilterValidator { @Override @NotNull public String getFilterValue(@NotNull final String filterName, @NotNull final String filterValue) { if(RESOURCE_TYPE.equals(filterName)) { return ResourceType.getValue(filterValue); } else { return filterValue; } }  }
TagFilterValidator implements FilterValidator { @Override @NotNull public String getFilterValue(@NotNull final String filterName, @NotNull final String filterValue) { if(RESOURCE_TYPE.equals(filterName)) { return ResourceType.getValue(filterValue); } else { return filterValue; } }  @Override @NotNull String getFilterValue(@NotNull final String filterName, @NotNull final String filterValue); }
TagFilterValidator implements FilterValidator { @Override @NotNull public String getFilterValue(@NotNull final String filterName, @NotNull final String filterValue) { if(RESOURCE_TYPE.equals(filterName)) { return ResourceType.getValue(filterValue); } else { return filterValue; } }  @Override @NotNull String getFilterValue(@NotNull final String filterName, @NotNull final String filterValue);  }