@@ -0,0 +1,2603 @@
+/*%0A * Copyright 2021 The Android Open Source Project%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage androidx.appsearch.cts.app;%0A%0Aimport static com.google.common.truth.Truth.assertThat;%0A%0Aimport androidx.appsearch.app.AppSearchSchema;%0Aimport androidx.appsearch.app.GetSchemaResponse;%0A%0Aimport org.junit.Test;%0A%0Apublic class GetSchemaResponseCtsTest %7B%0A    @Test%0A    public void testRebuild() %7B%0A        AppSearchSchema schema1 = new AppSearchSchema.Builder(%22Email1%22)%0A                .addProperty(new AppSearchSchema.StringPropertyConfig.Builder(%22subject%22)%0A                        .setCardinality(AppSearchSchema.PropertyConfig.CARDINALITY_OPTIONAL)%0A                        .setIndexingType(%0A                                AppSearchSchema.StringPropertyConfig.INDEXING_TYPE_PREFIXES)%0A                        .setTokenizerType(AppSearchSchema.StringPropertyConfig.TOKENIZER_TYPE_PLAIN)%0A                        .build()%0A                ).build();%0A        AppSearchSchema schema2 = new AppSearchSchema.Builder(%22Email2%22)%0A                .addProperty(new AppSearchSchema.StringPropertyConfig.Builder(%22subject%22)%0A                        .setCardinality(AppSearchSchema.PropertyConfig.CARDINALITY_OPTIONAL)%0A                        .setIndexingType(%0A                                AppSearchSchema.StringPropertyConfig.INDEXING_TYPE_PREFIXES)%0A                        .setTokenizerType(AppSearchSchema.StringPropertyConfig.TOKENIZER_TYPE_PLAIN)%0A                        .build()%0A                ).build();%0A%0A        GetSchemaResponse.Builder builder =%0A                new GetSchemaResponse.Builder().setVersion(42).addSchema(schema1);%0A%0A        GetSchemaResponse original = builder.build();%0A        GetSchemaResponse rebuild = builder.setVersion(37).addSchema(schema2).build();%0A%0A        // rebuild won't effect the original object%0A        assertThat(original.getVersion()).isEqualTo(42);%0A        assertThat(original.getSchemas()).containsExactly(schema1);%0A%0A        assertThat(rebuild.getVersion()).isEqualTo(37);%0A        assertThat(rebuild.getSchemas()).containsExactly(schema1, schema2);%0A    %7D%0A%7D%0A

Add GetSchemaResponse cts test.