@Test
public void itInjectsTheDefaultLocaleIfTheAcceptLanguagesHeaderIsMalformed() throws Exception {
final HttpRequestContext request = mock(HttpRequestContext.class);
when(request.getAcceptableLanguages()).thenThrow(new WebApplicationException(400));
final HttpContext context = mock(HttpContext.class);
when(context.getRequest()).thenReturn(request);
assertThat(provider.getValue(context), is(Locale.getDefault()));
}