Rewrite tests to be less integrated

Now mocking JSEX