Add tests for sentences ending with reference

Change-Id: I5ec0fe5b971de5f56aa3b8dc818add87f4c3c1f3