@Override
    public void close() {
        try {
            LOG.debug("Closing JMS connection.");
            session.close();
            connection.close();
        } catch (JMSException e) {
            LOG.warn("Error closing JMS connection.", e);
        }

    }
@Test
    public void testSerializability() throws IOException {
        JmsSpout spout = new JmsSpout();
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        ObjectOutputStream oos = new ObjectOutputStream(out);
        oos.writeObject(spout);
        oos.close();
        assertTrue(out.toByteArray().length > 0);
    }