Added mocking of popen and basic submission test