Added missing unit test for JsonEncoder.