001/* 002 * Copyright 2020 Global Biodiversity Information Facility (GBIF) 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.gbif.api.model.common.search; 017 018import org.gbif.api.model.checklistbank.search.NameUsageSearchParameter; 019 020import java.util.Arrays; 021import java.util.List; 022 023import org.junit.jupiter.api.Test; 024 025import static org.junit.jupiter.api.Assertions.assertEquals; 026 027/** 028 * Tests for class SearchResponse 029 */ 030public class SearchResponseTest { 031 032 @Test 033 public void testEquals() { 034 List<String> results = Arrays.asList("r1", "r2", "r3"); 035 036 long offset = 10L; 037 Long count = 100L; 038 int limit = 40; 039 SearchResponse<String, ?> searchResponse1 = 040 new SearchResponse<String, NameUsageSearchParameter>(offset, limit, count, results, null); 041 SearchResponse<String, ?> searchResponse2 = 042 new SearchResponse<String, NameUsageSearchParameter>(offset, limit, count, results, null); 043 044 assertEquals(searchResponse1, searchResponse2); 045 } 046 047}