### Question:
JsonToBean { public static JMSConnectionInfo createJMSConnectionInfo(JSONObject json) { final JMSConnectionInfoWrapper jmsInfo = (JMSConnectionInfoWrapper) Proxy.newProxyInstance( JsonToBean.class.getClassLoader(), new Class[] { JMSConnectionInfoWrapper.class }, new JsonInvocationHandler(JMS_CONNECTION_INFO, json)); return new JMSConnectionInfo() { @Override public String getTopicPrefix() { return jmsInfo.getTopicPrefix(); } @Override public String getTopicPattern(AppType appType) { return (String)jmsInfo.getTopicPatternProperties().get(appType.name()); } @Override public Properties getJNDIProperties() { return jmsInfo.getJNDIProperties(); } }; }  static WorkflowAction createWorkflowAction(JSONObject json); static List<WorkflowAction> createWorkflowActionList(JSONArray json); static WorkflowJob createWorkflowJob(JSONObject json); static List<WorkflowJob> createWorkflowJobList(JSONArray json); static CoordinatorAction createCoordinatorAction(JSONObject json); static List<CoordinatorAction> createCoordinatorActionList(JSONArray json); static CoordinatorJob createCoordinatorJob(JSONObject json); static JMSConnectionInfo createJMSConnectionInfo(JSONObject json); static List<CoordinatorJob> createCoordinatorJobList(JSONArray json); static BundleJob createBundleJob(JSONObject json); static List<BundleJob> createBundleJobList(JSONArray json); static BulkResponse createBulkResponse(JSONObject json); static List<BulkResponse> createBulkResponseList(JSONArray json); static List<String> createBulkWriteJobIdList(JSONArray json);  }### Answer:
@Test public void testParseJMSInfo() { JSONObject json = createJMSInfoJSONObject(); JMSConnectionInfo jmsDetails = JsonToBean.createJMSConnectionInfo(json); assertEquals("topicPrefix", jmsDetails.getTopicPrefix()); assertEquals("wfTopic", jmsDetails.getTopicPattern(AppType.WORKFLOW_JOB)); assertEquals("wfTopic", jmsDetails.getTopicPattern(AppType.WORKFLOW_ACTION)); assertEquals("coordTopic", jmsDetails.getTopicPattern(AppType.COORDINATOR_ACTION)); Properties jmsProps = jmsDetails.getJNDIProperties(); assertNotNull(jmsDetails.getJNDIProperties()); assertEquals("v1", jmsProps.get("k1")); assertEquals("v2", jmsProps.get("k2")); }