### Question:
JCAChannelHandler extends MultiplexedChannelHandler<JCAConnectionPayload, JCAMessagePayload> { public boolean isPutCallback() { return putCallback; } JCAChannelHandler(String channelName, JCADataSource jcaDataSource); boolean isPutCallback(); boolean isLongString(); JCADataSource getJcaDataSource(); String getJcaChannelName(); @Override synchronized void connect(); @Override synchronized void disconnect(); @Override void write(Object newValue, final ChannelWriteCallback callback); @Override synchronized Map<String, Object> getProperties(); static Pattern longStringPattern; }### Answer:
@Test public void new1() { JCAChannelHandler channel = new JCAChannelHandler("test", dataSource); assertThat(channel.getChannelName(), equalTo("test")); assertThat(channel.isPutCallback(), equalTo(false)); }
@Test public void new2() { JCAChannelHandler channel = new JCAChannelHandler("test {\"putCallback\":true}", dataSource); assertThat(channel.getChannelName(), equalTo("test {\"putCallback\":true}")); assertThat(channel.isPutCallback(), equalTo(true)); }
@Test public void new3() { JCAChannelHandler channel = new JCAChannelHandler("test {\"putCallback\":false}", dataSource); assertThat(channel.getChannelName(), equalTo("test {\"putCallback\":false}")); assertThat(channel.isPutCallback(), equalTo(false)); }