Added ResourcePool class and tests