}
@Test
public void testRegionMatcher_contained() {
// left aligned in region
RegionMatch match = new RegionMatch("abc", 0, new TextRegion(0, 5));
assertEquals("Should be CONTAINED left", RegionMatch.IntersectionType.CONTAINED, match.getIntersectionType());
Triple<CharSequence, CharSequence, CharSequence> applied = match.apply();
assertEquals("abc", applied.getFirst().toString());
assertEquals("", applied.getSecond().toString());
assertEquals("", applied.getThird().toString());
// "centered" in region
match = new RegionMatch("abc", 2, new TextRegion(0, 6));
assertEquals(
"Should be CONTAINED centered", RegionMatch.IntersectionType.CONTAINED, match.getIntersectionType());
applied = match.apply();
assertEquals("abc", applied.getFirst().toString());
assertEquals("", applied.getSecond().toString());
assertEquals("", applied.getThird().toString());
// right aligned in region
match = new RegionMatch("abc", 2, new TextRegion(0, 5));
assertEquals("Should be CONTAINED right", RegionMatch.IntersectionType.CONTAINED, match.getIntersectionType());
applied = match.apply();
assertEquals("abc", applied.getFirst().toString());
assertEquals("", applied.getSecond().toString());
assertEquals("", applied.getThird().toString());
}