@Override
    public int compareTo(ResourceConfig other) {
        return name.compareTo(other.name);
    }
@Test
    public void shouldCompareBasedOnName() {
        ResourceConfig resourceConfigA = new ResourceConfig("aaa");
        ResourceConfig resourceConfigB = new ResourceConfig("bbb");
        assertThat(resourceConfigA.compareTo(resourceConfigB), is(org.hamcrest.Matchers.lessThan(0)));
        assertThat(resourceConfigB.compareTo(resourceConfigA), is(greaterThan(0)));
        assertThat(resourceConfigA.compareTo(resourceConfigA), is(0));
    }