@Override
    public Set<IpSubnet> convertFrom(String value) {
        final Set<IpSubnet> converted = new LinkedHashSet<>();
        if (value != null) {
            Iterable<String> subnets = Splitter.on(',').trimResults().split(value);
            for (String subnet : subnets) {
                try {
                    converted.add(new IpSubnet(subnet));
                } catch (UnknownHostException e) {
                    throw new ParameterException("Invalid subnet: " + subnet);
                }
            }
        }
        return converted;
    }
@Test
    public void convertFromThrowsParameterExceptionWithInvalidSubnet() {
        expectedException.expect(ParameterException.class);
        expectedException.expectMessage("Invalid subnet: HODOR");
        converter.convertFrom("127.0.0.1/32, ::1/128, HODOR");
    }