question: public void testBug19169 ( ) throws Exception { MysqlDataSource toSerialize = new MysqlDataSource ( ) ; toSerialize . setZeroDateTimeBehavior ( "convertToNull" ) ; boolean testBooleanFlag = ! toSerialize . getAllowLoadLocalInfile ( ) ; toSerialize . setAllowLoadLocalInfile ( testBooleanFlag ) ; int testIntFlag = toSerialize . getBlobSendChunkSize ( ) + 1 ; toSerialize . setBlobSendChunkSize ( String . valueOf ( testIntFlag ) ) ; ByteArrayOutputStream bOut = new ByteArrayOutputStream ( ) ; ObjectOutputStream objOut = new ObjectOutputStream ( bOut ) ; objOut . writeObject ( toSerialize ) ; objOut . flush ( ) ; ObjectInputStream objIn = new ObjectInputStream ( new ByteArrayInputStream ( bOut . toByteArray ( ) ) ) ; MysqlDataSource thawedDs = ( MysqlDataSource ) objIn . readObject ( ) ; assertEquals ( "convertToNull" , thawedDs . getZeroDateTimeBehavior ( ) ) ; assertEquals ( testBooleanFlag , thawedDs . getAllowLoadLocalInfile ( ) ) ; assertEquals ( testIntFlag , thawedDs . getBlobSendChunkSize ( ) ) ; }
target:  Tests fix for BUG#19169 - ConnectionProperties (and thus some subclasses) are not serializable, even though some J2EE containers expect them to be.