final int length) {
if (isHarmony()) {
Object value = doc.getProperty(PropertyNames.COMPOSED_TEXT_PROPERTY);
if (!shouldBe) {
if (value != null) {
ComposedTextParams params = (ComposedTextParams) value;
assertNull(params.getComposedText());
assertEquals(0, params.getComposedTextLength());
}
return;
}
assertTrue(value instanceof ComposedTextParams);
ComposedTextParams params = (ComposedTextParams) value;
assertEquals(start, params.getComposedTextStart());
assertEquals(length, params.getComposedTextLength());
AttributedString text = params.getComposedText();
AttributedCharacterIterator iter1 = attrString.getIterator();
AttributedCharacterIterator iter2 = text.getIterator();
assertEquals(iter1.getAttributes(), iter2.getAttributes());
assertEquals(iter1.getRunStart(SEGMENT_ATTRIBUTE), iter2
.getRunStart(SEGMENT_ATTRIBUTE));