Make isPost on test to be explicitly false by default
Capture received token on successful authenticate

Store in obtainedToken
Replace JSONObject.keySet() call with .keys()
Remove trailing comma in simple sample test