@Test
public void getSchemaMetadataList() {

    ISchemaRegistryClient client = new DefaultSchemaRegistryClientForTesting(){
        public List<String> getSchemaNames(List<String> schemaGroup) {
            if(!schemaGroup.contains("Group1")) {
                return new ArrayList<>();
            }
            List<String> schemas = new ArrayList<>();
            schemas.add("testSchema");
            return schemas;
        }
    };
    AutocompletionAgent autocompletionAgent =
            new AutocompletionAgent("schema-registry", client);
    List<String> groupList = new ArrayList<>();
    groupList.add("Group1");
    groupList.add("Group2");
    List<String> res = autocompletionAgent.getSchemaMetadataList("tes", groupList, new ArrayList<>());
    List<String> expected = new ArrayList<>();
    expected.add("testSchema");
    assertEquals(1, res.size());
    assertThat(res, is(expected));
    res = autocompletionAgent.getSchemaMetadataList("tesSome", groupList, new ArrayList<>());
    assertEquals(0, res.size());
}