builder.addRegexpContentRecogniser(version1, inputData);
builder.addStep(version1, version2,
new TestStreamMigrator(inputData, outputData));
builder.endType();
ResourceMigrator resourceMigrator = builder.getCompletedResourceMigrator();
ByteArrayInputStream bais = new ByteArrayInputStream(
inputData.getBytes());
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
DefaultInputMetadata meta = new DefaultInputMetadata(filename, true);
resourceMigrator.migrate(meta, bais, new OutputCreator() {
public OutputStream createOutputStream() {
return baos;
}
});
assertEquals("", outputData, new String(baos.toByteArray()));