@Test
public void throwsWebApplicationExceptionWithStatus_NOT_FOUND_WhenFieldAnnotatedWithMatrixParamAnnotationCanNotBeResolved() throws Exception {

    when(matrixParameterResolver.resolve(isA(Parameter.class), eq(applicationContext))).thenThrow(new Exception());
    FieldInjectorImpl fieldInjector = new FieldInjectorImpl(Resource.class.getDeclaredField("matrixParam"), parameterResolverFactory);
    Resource instance = new Resource();
    thrown.expect(webApplicationExceptionWithStatusMatcher(NOT_FOUND));
    fieldInjector.inject(instance, applicationContext);
}