// Check the input.
InputStreamByteArray isba = new InputStreamByteArray(input);
Assert.assertTrue(new String(isba.getByteArray()).equals(inputData));
// Generate output.
OutputStreamByteArray osba = new OutputStreamByteArray(
outputData.getBytes());
osba.writeTo(output);
} catch (IOException e) {
throw new ResourceMigrationException("unlikely", e);
}
}