### Question:
ImmutableQueryParameter implements Parameter { static ImmutableQueryParameter create(String name, Collection<?> rawValues) { checkNotNull(name,"Parameter name cannot be null"); checkArgument(!name.trim().isEmpty(),"Parameter name cannot be empty"); checkNotNull(rawValues,"Raw values cannot be null"); checkArgument(!rawValues.isEmpty(),"No raw values specified"); Builder<String> strRawValues=ImmutableList.<String>builder(); for(Object rawValue:rawValues) { strRawValues.add(rawValue.toString()); } return new ImmutableQueryParameter(name, strRawValues.build()); } private  ImmutableQueryParameter(String name, ImmutableList<String> rawValues); @Override String name(); @Override boolean isMultivalued(); @Override int cardinality(); @Override String rawValue(); @Override List<String> rawValues(); @Override T rawValueAs(Class<? extends T> clazz); @Override List<T> rawValuesAs(Class<? extends T> clazz); @Override String toString();  }### Answer:
@Test(expected=NullPointerException.class) public void failOnCreationWithNullParameterName() { ImmutableQueryParameter.create(null, MULTI_VALUED_RAW_VALUES); }
@Test(expected=IllegalArgumentException.class) public void failOnCreationWithEmptyParameterName() { ImmutableQueryParameter.create(" ", ImmutableList.of("value1")); }
@Test(expected=NullPointerException.class) public void failOnCreationWithNullRawValueCollection() { ImmutableQueryParameter.create(PARAMETER_NAME, (Collection<?>)null); }
@Test(expected=IllegalArgumentException.class) public void failOnCreationWithEmptyRawValueCollection() { ImmutableQueryParameter.create(PARAMETER_NAME, Collections.emptyList()); }