@Test
public final void testTextMigration() {

    try {
        System.out.println(texttestpdf.getCanonicalPath());
        /**
         * Testing the web services by calling it with
         * a digital object instance containing a PDF file version 1.4
         * and expect the service to return a file containing UTF-8 text.
         */
        final DigitalObject doInput =
            new DigitalObject.Builder(
                Content.byReference((texttestpdf).toURI().toURL()))
                .permanentUri(URI.create("http://example.com/test.pdf"))
                .title("test.pdf")
                .build();
        System.out.println("Input " + doInput);
        URI inputformatpdf = null;
        URI outputformatUnicode = null;
        inputformatpdf = new URI("info:pronom/fmt/18");
        outputformatUnicode = new URI("info:pronom/x-fmt/16");
        final MigrateResult mr = dom.migrate(doInput, inputformatpdf,
            outputformatUnicode, null);
        final DigitalObject doOutput = mr.getDigitalObject();
        assertNotNull("Resulting digital object is null.", doOutput);
        System.out.println("Output" + doOutput);
        final File resultText = DigitalObjectUtils.toFile(doOutput); // TODO need extension?
        assertTrue("Result file was not created successfully!",
                    resultText.exists());
        System.out.println("Please find the result text file here: \n"
                + resultText.getAbsolutePath());
        assertFalse("Resulting digital object equal to the original.",
                doInput.equals(doOutput));
    } catch (Exception e) {
        e.printStackTrace();
    }
}