QueryStringQuery extends MinimumShouldMatchQuery { public static Init<?> builder() { return new QueryStringQueryBuilder(); } QueryStringQuery(QueryTypeArrayList<QueryTypeItem> queryBag); @Override String getQueryString(); static Init<?> builder();  }
@Test(expected = MandatoryParametersAreMissingException.class) public void when_no_parameters_added_then_exception_thrown() throws MandatoryParametersAreMissingException { QueryStringQuery .builder() .build(); }
@Test(expected = MandatoryParametersAreMissingException.class) public void when_no_field_param_added_then_exception_thrown() throws MandatoryParametersAreMissingException { QueryStringQuery .builder() .query("apple") .build(); }
@Test(expected = MandatoryParametersAreMissingException.class) public void when_no_query_param_added_then_exception_thrown() throws MandatoryParametersAreMissingException { QueryStringQuery .builder() .defaultField("apple") .build(); }