public boolean isSameAs(Component.Type otherType) {
    if (otherType.isViewsType()) {
      return otherType == this.viewsMaxDepth;
    }
    if (otherType.isReportType()) {
      return otherType == this.reportMaxDepth;
    }
    throw new UnsupportedOperationException(UNSUPPORTED_TYPE_UOE_MSG);
  }
@Test
  public void LEAVES_is_same_as_FILE_and_PROJECT_VIEW() {
    assertThat(CrawlerDepthLimit.LEAVES.isSameAs(Type.FILE)).isTrue();
    assertThat(CrawlerDepthLimit.LEAVES.isSameAs(Type.PROJECT_VIEW)).isTrue();
    for (Type type : from(asList(Type.values())).filter(not(in(ImmutableSet.of(Type.FILE, Type.PROJECT_VIEW))))) {
      assertThat(CrawlerDepthLimit.LEAVES.isSameAs(type)).isFalse();
    }
  }