### Question:
ConnectorInstanceDatastore extends CommonDatastore<ConnectorInstanceItem, ConnectorInstance> implements DatastoreHasSearch<ConnectorInstanceItem> { protected SearchOptions buildSearchOptions(final int page, final int resultsByPage, final String search, final String orders, final Map<String, String> filters) { final SearchOptionsBuilder builder = SearchOptionsBuilderUtil.buildSearchOptions(page, resultsByPage, orders, search); addStringFilterToSearchBuilder(filters, builder, ConnectorInstanceItem.ATTRIBUTE_CONTAINER_ID, ConnectorInstancesSearchDescriptor.CONTAINER_ID); addStringFilterToSearchBuilder(filters, builder, ConnectorInstanceItem.ATTRIBUTE_STATE, ConnectorInstancesSearchDescriptor.STATE); return builder.done(); } ConnectorInstanceDatastore(final APISession engineSession); @Override ItemSearchResult<ConnectorInstanceItem> search(final int page, final int resultsByPage, final String search, final String orders,
            final Map<String, String> filters);  }### Answer:
@Test public void searchBuildRightParameters() throws Exception { final Map<String, String> filters = new HashMap<String, String>(); filters.put(ConnectorInstanceItem.ATTRIBUTE_CONTAINER_ID, "1"); filters.put(ConnectorInstanceItem.ATTRIBUTE_STATE, "2"); final SearchOptions searchOptions = this.spiedDatastore.buildSearchOptions(0, 123, "searchTerm", "order " + Order.ASC, filters); Assert.assertEquals(0, searchOptions.getStartIndex()); Assert.assertEquals(123, searchOptions.getMaxResults()); Assert.assertEquals("searchTerm", searchOptions.getSearchTerm()); Assert.assertEquals("order", searchOptions.getSorts().get(0).getField()); Assert.assertEquals(Order.ASC, searchOptions.getSorts().get(0).getOrder()); Assert.assertEquals(filters.size(), searchOptions.getFilters().size()); }