### Question:
DynamoSchema { public boolean hasGlobalSecondaryIndexes() { return getIndexes().stream().anyMatch(index -> index.getIndexType().equals(IndexType.GLOBAL_SECONDARY_INDEX)); }  TypeElement getDocumentElement(); DynamoIndex getTableIndex(); Set<DynamoIndex> getLocalSecondaryIndexes(); boolean hasLocalSecondaryIndexes(); Set<DynamoIndex> getGlobalSecondaryIndexes(); boolean hasGlobalSecondaryIndexes();  }### Answer:
@Test void hasGlobalSecondaryIndexes_none_returnsFalse() { assertThat(schema().build().hasGlobalSecondaryIndexes()).isFalse(); }
@Test void hasGlobalSecondaryIndexes_hasIndex_returnsTrue() { DynamoIndex lsi = index() .indexType(IndexType.GLOBAL_SECONDARY_INDEX) .build(); DynamoSchema schema = schema() .indexes(singleton(lsi)) .build(); assertThat(schema.hasGlobalSecondaryIndexes()).isTrue(); }