Added more tests, and fixed a probem with JsonRestStores where prepareBeforeSend wasn't called