@Test(expected = IllegalArgumentException.class)
 public void setPreferredLocalesWithEmptyList() {
   request.setPreferredLocales(new ArrayList<Locale>());
 }
 @Test
 public void setPreferredLocales() {
   List<Locale> preferredLocales = Arrays.asList(Locale.ITALY, Locale.CHINA);
   request.setPreferredLocales(preferredLocales);
   assertEqualEnumerations(Collections.enumeration(preferredLocales), request.getLocales());
 }
 @Test(expected = IllegalArgumentException.class)
 public void setPreferredLocalesWithNullList() {
   request.setPreferredLocales(null);
 }