Refactored test code to use JsonMatchers