Remove some test code and add session mock to JHelperMediaTest