### Question:
WindowQueryBuilder implements QueryOperationBuilder { public <K, V> Query<K, V> fetch() { return new Query<>(storeName, new FetchWindowQueryBuilder<>()); } WindowQueryBuilder(final String storeName); @Override Query operation(final StoreOperation operation); Query<K, V> fetch(); Query<Windowed<K>, V> fetchKeyRange(); Query<Long, V> fetchTimeRange(); Query<Windowed<K>, V> fetchAll(); Query<Windowed<K>, V> all(); static final String QUERY_PARAM_KEY; static final String QUERY_PARAM_KEY_FROM; static final String QUERY_PARAM_KEY_TO; static final String QUERY_PARAM_TIME; static final String QUERY_PARAM_TIME_FROM; static final String QUERY_PARAM_TIME_TO; static final Error INVALID_TIME_ERROR; }### Answer:
@Test public void shouldThrowInvalidQueryWhenBuildingWindowFetchGivenNoKeyParam() { final Query query = new WindowQueryBuilder(STORE_NAME).fetch(); InvalidQueryException exception = assertThrows(InvalidQueryException.class, query::prepare); assertEquals( exception.getMessage(), "Missing requires parameters : [" + WindowQueryBuilder.QUERY_PARAM_KEY + ", " + WindowQueryBuilder.QUERY_PARAM_TIME + "]"); }