public void testBufferedContentItem() throws Exception {
TestContentListener listener = new TestContentListener();
BufferedContentItem content = new BufferedContentItem( listener );
OutputStream out = content.getOutputStream( null );
content.setMimeType( "text/test" );
out.write( "test sting".getBytes() );
content.closeOutputStream();
InputStream in = content.getInputStream();
byte[] b = new byte[100];
int n = in.read( b );
assertEquals( "test sting", new String( b, 0, n ) );