Refatoring RequestResource and implementing http tests.