LiferayReader implements Reader<IndexedRecord> { @Override public boolean start() throws IOException { if (_started) { throw new IllegalStateException("Reader has already started"); } _currentPage = 1; _lastPage = Integer.MIN_VALUE; _readEndpointJsonObject(); if (_itemsJsonArray.isEmpty()) { return false; } _dataCount = 0; _hasMore = true; _started = true; return true; } LiferayReader(
		LiferaySource liferaySource,
		LiferayInputProperties liferayInputProperties); @Override boolean advance(); @Override void close(); @Override IndexedRecord getCurrent(); JsonValue getCurrentJsonValue(); @Override Source getCurrentSource(); @Override Instant getCurrentTimestamp(); @Override Map<String, Object> getReturnValues(); @Override boolean start();  }
@Test public void testStartIfEmptyPageReturned() throws Exception { String openAPIModule = "/headless-commerce-admin-catalog/v1.0"; String endpoint = "/taxonomy-vocabularies/{id}/taxonomy-categories"; LiferayReader liferayReader = new LiferayReader( _getLiferayFixedResponseContentSource( readObject("page_no_content.json")), _getTLiferayInputProperties( Operation.Unavailable, openAPIModule, _OAS_URL, endpoint)); Assert.assertFalse( "Liferay input reader must not be initialized and advanced", liferayReader.start()); }