*/
	public void testDataDuringClose() throws Exception {
		testBasic();
		clientEngine.initiateClose();
		
		ByteBuffer data = ByteBuffer.allocate(10);
		helper.putString(data, "asdf");
		helper.doneFillingBuffer(data);
		serverEngine.feedPlainPacket(data, null);
		ByteBuffer encData = serverList.getPacketEncrypted();
		
		String expected = "asdf";
		ByteBuffer tmp = ByteBuffer.allocate(10);
		helper.putString(tmp, expected);
		helper.doneFillingBuffer(tmp);
		try {
			clientEngine.feedPlainPacket(tmp, null);
			fail("should have thrown exception");
		} catch(IllegalStateException e) {}
		
		ByteBuffer b = clientList.getPacketEncrypted();
		
		serverEngine.feedEncryptedPacket(b, null);
		
		ByteBuffer hsMsg = serverList.getPacketEncrypted();
		Assert.assertTrue(serverList.isClosed());
		
		clientEngine.feedEncryptedPacket(encData, null); 
		b = clientList.getAssembledUnencryptedPacket();
		log.info("******buffer="+b);
		String actual = helper.readString(b, b.remaining());
		assertEquals(expected, actual);
		
		clientEngine.feedEncryptedPacket(hsMsg, null);

		Assert.assertTrue(clientList.isClosed());
	}