SpringQueryService implements ViewQueryService { @Override public ViewQuery newQuery(final String designDoc, final String view) { final ViewQuery query = ViewQuery.from(designDoc, view); query.debug(debug); query.stale(stale); return query; } @Autowired  SpringQueryService(@Value("${couchbase.debug:true}") final boolean debug,
      @Value("${couchbase.stale:FALSE}") final Stale stale); @Override ViewQuery newQuery(final String designDoc, final String view);  }
@Test public void shouldReturnQuery() { final SpringQueryService service = new SpringQueryService(true, Stale.TRUE); final ViewQuery newQuery = service.newQuery("designDoc", "view"); assertNotNull(newQuery); }