}
@Test
public void testEncodingOnPreSuspend() throws IOException, ServletException {
final AtomicReference<AtmosphereResponse> e = new AtomicReference<AtmosphereResponse>();
framework.addAtmosphereHandler("/a", new AbstractReflectorAtmosphereHandler() {
@Override
public void onRequest(AtmosphereResource resource) throws IOException {
resource.addEventListener(new AtmosphereResourceEventListenerAdapter() {
@Override
public void onPreSuspend(AtmosphereResourceEvent event) {