// Path: src/main/java/org/codelibs/fess/suggest/exception/SuggesterException.java
// public class SuggesterException extends RuntimeException {
// 
//     private static final long serialVersionUID = 1L;
// 
//     public SuggesterException(final String msg) {
//         super(msg);
//     }
// 
//     public SuggesterException(final Throwable cause) {
//         super(cause);
//     }
// 
//     public SuggesterException(final String msg, final Throwable cause) {
//         super(msg, cause);
//     }
// }
// 
// Path: src/main/java/org/codelibs/fess/suggest/request/suggest/SuggestResponse.java
// public class SuggestResponse implements Response {
//     protected final String index;
// 
//     protected final long tookMs;
// 
//     protected final List<String> words;
// 
//     protected final int num;
// 
//     protected final long total;
// 
//     protected final List<SuggestItem> items;
// 
//     public SuggestResponse(final String index, final long tookMs, final List<String> words, final long total,
//             final List<SuggestItem> items) {
//         this.index = index;
//         this.tookMs = tookMs;
//         this.words = words;
//         this.num = words.size();
//         this.total = total;
//         this.items = items;
//     }
// 
//     public String getIndex() {
//         return index;
//     }
// 
//     public long getTookMs() {
//         return tookMs;
//     }
// 
//     public List<String> getWords() {
//         return words;
//     }
// 
//     public int getNum() {
//         return num;
//     }
// 
//     public long getTotal() {
//         return total;
//     }
// 
//     public List<SuggestItem> getItems() {
//         return items;
//     }
// }


import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.util.Collections;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import org.codelibs.fess.suggest.exception.SuggesterException;
import org.codelibs.fess.suggest.request.suggest.SuggestResponse;
import org.junit.Test;
/*
 * Copyright 2012-2022 CodeLibs Project and the Others.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 * either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 */
package org.codelibs.fess.suggest.concurrent;




public class DeferredTest {
    @Test
    public void test_doneBeforeResolve() throws Exception {
// Path: src/main/java/org/codelibs/fess/suggest/exception/SuggesterException.java
// public class SuggesterException extends RuntimeException {
// 
//     private static final long serialVersionUID = 1L;
// 
//     public SuggesterException(final String msg) {
//         super(msg);
//     }
// 
//     public SuggesterException(final Throwable cause) {
//         super(cause);
//     }
// 
//     public SuggesterException(final String msg, final Throwable cause) {
//         super(msg, cause);
//     }
// }
// 
// Path: src/main/java/org/codelibs/fess/suggest/request/suggest/SuggestResponse.java
// public class SuggestResponse implements Response {
//     protected final String index;
// 
//     protected final long tookMs;
// 
//     protected final List<String> words;
// 
//     protected final int num;
// 
//     protected final long total;
// 
//     protected final List<SuggestItem> items;
// 
//     public SuggestResponse(final String index, final long tookMs, final List<String> words, final long total,
//             final List<SuggestItem> items) {
//         this.index = index;
//         this.tookMs = tookMs;
//         this.words = words;
//         this.num = words.size();
//         this.total = total;
//         this.items = items;
//     }
// 
//     public String getIndex() {
//         return index;
//     }
// 
//     public long getTookMs() {
//         return tookMs;
//     }
// 
//     public List<String> getWords() {
//         return words;
//     }
// 
//     public int getNum() {
//         return num;
//     }
// 
//     public long getTotal() {
//         return total;
//     }
// 
//     public List<SuggestItem> getItems() {
//         return items;
//     }
// }


// Path: src/test/java/org/codelibs/fess/suggest/concurrent/DeferredTest.java
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.util.Collections;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import org.codelibs.fess.suggest.exception.SuggesterException;
import org.codelibs.fess.suggest.request.suggest.SuggestResponse;
import org.junit.Test;

/*
 * Copyright 2012-2022 CodeLibs Project and the Others.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 * either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 */
package org.codelibs.fess.suggest.concurrent;




public class DeferredTest {
    @Test
    public void test_doneBeforeResolve() throws Exception {
        final Deferred<SuggestResponse> deferred = new Deferred<>();