I'd like to improve WindowFeatureGeneratorTest from the following perspective:
- testWindowSizeOne should check the contents of the returned features. It checks the length of the features only now
- most of test methods uses Assert.assertEquals(expected, actual) in opposite way for its arguments when checking the contents of the returned features
- Though I pointed out the arguments in assertEquals() above, I think we'd better use exact concrete string rather than expression such like testSentence[testTokenIndex] for the expected. And also, testForCorrectFeatures uses contains method when checking the contents of the returned features but I think we should avoid using contains when checking the items in a List, rather than writing like this:
but I'd like to rewrite them like this:
The second form helps us to understand how WindowFeatureGenerator works and it's easier to read.