### Question:
Modifier { public static String convertToQuery(Modifier ... modifiers) { StringBuilder ret = new StringBuilder(); boolean first = true; for (Modifier mod : modifiers) { if (first) { first = false; } else { ret.append("&"); } ret.append(mod.toString()); } return ret.toString(); }  static String convertToQuery(Modifier ... modifiers); static Modifier[] convertFromQuery(@Nullable String query); static Duration duration(double seconds); static TransitionTarget transitionTarget(); static All all(); static final Modifier[] EMPTY_LIST; }### Answer:
@Test void convertToQuery() { assertEquals("d=2.00&tt&all", Modifier.convertToQuery( Modifier.duration(2), Modifier.transitionTarget(), Modifier.all())); assertThrows(IllegalArgumentException.class, ()->Modifier.convertToQuery( Modifier.duration(-2), Modifier.transitionTarget(), Modifier.all())); }