### Question:
OrderConverter implements javax.ws.rs.ext.ParamConverter<Order> { @Override public Order fromString(String value) { return Order.fromText(value); }  @Override Order fromString(String value); @Override String toString(Order value);  }### Answer:
@Test public void shouldIgnoreCase() { assertEquals(ASC, orderConverter.fromString("aSc")); assertEquals(DESC, orderConverter.fromString("DEsc")); }
@Test public void shouldThrowIllegalArgumentExceptionWithInvalidText() throws Exception { expectedException.expect(IllegalArgumentException.class); String invalidText = Arrays.stream(Order.values()).map(Order::toString).collect(joining(".")); orderConverter.fromString(invalidText); }