@Override
  public Iterable<Duplication> getDuplications(Component file) {
    checkFileComponentArgument(file);

    Collection<Duplication> res = this.duplications.asMap().get(file.getKey());
    if (res == null) {
      return Collections.emptyList();
    }
    return res;
  }
@Test
  @UseDataProvider("allComponentTypesButFile")
  public void getDuplications_throws_IAE_if_Component_type_is_not_FILE(Component.Type type) {
    assertThatThrownBy(() -> {
      Component component = mockComponentGetType(type);
      underTest.getDuplications(component);
    })
      .isInstanceOf(IllegalArgumentException.class)
      .hasMessage("type of file must be FILE");
  }