@SuppressWarnings("unchecked")
  public static <T> T getObjectWithKey(String key, RequestContext requestContext, Class<T> clazz)
  {
    final Object object = requestContext.getLocalAttr(key);

    return (clazz.isInstance(object)) ? (T) object : null;
  }
@Test
  public void testGetObjectWithKeyNotInstanceOf()
  {
    _requestContext.putLocalAttr(KEY, VALUE);

    Assert.assertNull(RequestContextUtil.getObjectWithKey(KEY, _requestContext, Integer.class));
  }