/*
 * Copyright 2016-present Open Networking Laboratory
 *
 * 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.onosproject.store.resource.impl;

import com.google.common.collect.ImmutableSet;
import org.junit.Test;
import org.onosproject.net.DeviceId;
import org.onosproject.net.resource.DiscreteResource;
import org.onosproject.net.resource.Resources;

import java.util.Optional;

import static org.hamcrest.Matchers.is;
import static org.junit.Assert.*;

public class EmptyDiscreteResourcesTest {
    private EmptyDiscreteResources sut = EmptyDiscreteResources.INSTANCE;

    @Test
    public void testLookup() {
        assertThat(sut.lookup(Resources.discrete(DeviceId.deviceId("a")).id()), is(Optional.empty()));
    }

    @Test
    public void testDifference() {
        DiscreteResource res1 = Resources.discrete(DeviceId.deviceId("a")).resource();
        DiscreteResource res2 = Resources.discrete(DeviceId.deviceId("b")).resource();

        assertThat(sut.difference(DiscreteResources.of(ImmutableSet.of(res1))),
                is(EmptyDiscreteResources.INSTANCE));
        assertThat(sut.difference(DiscreteResources.of(ImmutableSet.of(res2))),
                is(EmptyDiscreteResources.INSTANCE));
    }

    @Test
    public void testIsEmpty() {
        assertThat(sut.isEmpty(), is(true));
    }

    @Test
    public void testContainsAny() {
        DiscreteResource res1 = Resources.discrete(DeviceId.deviceId("a")).resource();
        DiscreteResource res2 = Resources.discrete(DeviceId.deviceId("b")).resource();

        assertThat(sut.containsAny(ImmutableSet.of(res1)), is(false));
        assertThat(sut.containsAny(ImmutableSet.of(res2)), is(false));
    }

    @Test
    public void testAdd() {
        DiscreteResource res1 = Resources.discrete(DeviceId.deviceId("a")).resource();
        DiscreteResource res2 = Resources.discrete(DeviceId.deviceId("b")).resource();

        assertThat(sut.add(DiscreteResources.of(ImmutableSet.of(res1))),
                is(DiscreteResources.of(ImmutableSet.of(res1))));
        assertThat(sut.add(DiscreteResources.of(ImmutableSet.of(res2))),
                is(DiscreteResources.of(ImmutableSet.of(res2))));
    }

    @Test
    public void testValues() {
        assertThat(sut.values(), is(ImmutableSet.of()));
    }
}

@@ -728,16 +728,48 @@
 t.Test;%0A
+import org.onlab.packet.VlanId;%0A
 import o
@@ -1851,32 +1851,272 @@
 (true));%0A    %7D%0A%0A
+    @Test%0A    public void testValuesOf() %7B%0A        // doesn't match any types of resources%0A        assertThat(sut.valuesOf(Object.class), is(ImmutableSet.of()));%0A        assertThat(sut.valuesOf(VlanId.class), is(ImmutableSet.of()));%0A    %7D%0A%0A
     @Test%0A    pu

Improve test coverage