### Question:
DynamoSchema { public Set<DynamoIndex> getLocalSecondaryIndexes() { return getIndexes().stream() .filter(index -> index.getIndexType().equals(IndexType.LOCAL_SECONDARY_INDEX)) .collect(toLinkedHashSet()); }  TypeElement getDocumentElement(); DynamoIndex getTableIndex(); Set<DynamoIndex> getLocalSecondaryIndexes(); boolean hasLocalSecondaryIndexes(); Set<DynamoIndex> getGlobalSecondaryIndexes(); boolean hasGlobalSecondaryIndexes();  }### Answer:
@Test void getLocalSecondaryIndexes_none_returnsEmptySet() { assertThat(schema().build().getLocalSecondaryIndexes()).isEmpty(); }
@Test void getLocalSecondaryIndexes_singleIndex_returnsIndex() { DynamoIndex lsi = index() .indexType(IndexType.LOCAL_SECONDARY_INDEX) .build(); DynamoSchema schema = schema() .indexes(singleton(lsi)) .build(); assertThat(schema.getLocalSecondaryIndexes()).containsExactly(lsi); }
@Test void getLocalSecondaryIndexes_multipleIndexes_returnsIndexesInOrder() { DynamoIndex lsi1 = index() .name("lsi1") .indexType(IndexType.LOCAL_SECONDARY_INDEX) .build(); DynamoIndex lsi2 = index() .name("lsi2") .indexType(IndexType.LOCAL_SECONDARY_INDEX) .build(); DynamoSchema schema = schema() .indexes(setOf(lsi1, lsi2)) .build(); assertThat(schema.getLocalSecondaryIndexes()).containsExactly(lsi1, lsi2); }