Look at it this way: no matter how you reorganize your code, the test data has to come from some file. I see 2 variants:
Data is encoded in-place, in one of the .java unit test source code files. It works only for small test data sets. You would need to refactor your code to take input stream and have another wrapper that works with file, as you described.
Test data file. You have to create a
project-wide convention where to keep your test
data files. Their location may be
relative to the jave project
location, or under a common test
data files root. In any case, it helps
to have a utility method that
returns a full test data file path given a "logical" file name.
It seems like in your case (just one test, a hundred words) the first solution may be enough. Yes, you would need to refactor the code a little. The second solution is more generic and personally I find it much more practical and applicable.
Some people would say this is not a unit test if it works with data files. Well, it's a matter of definition of "unit test", and is quite irrelevant. If you need to test your code, just find the best / most convenient way for your project.