@@ -0,0 +1,2568 @@
+/**%0A * Copyright (C) 2015 Red Hat, Inc.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *         http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage io.fabric8.kubernetes.client.utils;%0A%0Aimport static org.hamcrest.CoreMatchers.is;%0Aimport static org.hamcrest.MatcherAssert.assertThat;%0A%0Aimport io.fabric8.kubernetes.api.model.KubernetesList;%0Aimport io.fabric8.kubernetes.api.model.KubernetesListBuilder;%0Aimport io.fabric8.kubernetes.api.model.Pod;%0Aimport io.fabric8.kubernetes.api.model.PodBuilder;%0Aimport io.fabric8.kubernetes.api.model.ReplicationController;%0Aimport io.fabric8.kubernetes.api.model.ReplicationControllerBuilder;%0Aimport io.fabric8.kubernetes.api.model.Service;%0Aimport io.fabric8.kubernetes.api.model.ServiceBuilder;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Apublic class ResourceCompareTest %7B%0A%0A  private Pod pod;%0A  private Service service;%0A  private KubernetesList kubeList;%0A%0A  @Before%0A  public void setup() %7B%0A    pod = new PodBuilder().withNewMetadata().withName(%22pod1%22).withNamespace(%22test%22).and().build();%0A    service = new ServiceBuilder()%0A        .withNewMetadata().withName(%22service1%22).withNamespace(%22test%22).and()%0A        .build();%0A    final ReplicationController rc = new ReplicationControllerBuilder()%0A        .withNewMetadata().withName(%22repl1%22).withNamespace(%22test%22).endMetadata()%0A        .withNewSpec().withReplicas(1).endSpec()%0A        .build();%0A%0A    kubeList = new KubernetesListBuilder().withItems(pod, service, rc).build();%0A  %7D%0A%0A  @Test%0A  public void testResourceCompareEqualsTrue() throws Exception %7B%0A    assertThat(ResourceCompare.equals(kubeList, kubeList), is(true));%0A  %7D%0A%0A  @Test%0A  public void testResourceCompareEqualsFalse() throws Exception %7B%0A    final ReplicationController rc = new ReplicationControllerBuilder()%0A        .withNewMetadata().withName(%22repl1%22).withNamespace(%22test%22).endMetadata()%0A        .withNewSpec().withReplicas(2).endSpec()%0A        .build();%0A    final KubernetesList kubeList2 =%0A        new KubernetesListBuilder(kubeList).withItems(pod, service, rc).build();%0A    assertThat(ResourceCompare.equals(kubeList, kubeList2), is(false));%0A  %7D%0A%7D%0A

Add test for ResourceCompare.equals()