@Override
  public Optional<ScmInfo> getScmInfo(Component component) {
    requireNonNull(component, "Component cannot be null");

    if (component.getType() != Component.Type.FILE) {
      return Optional.empty();
    }

    return scmInfoCache.computeIfAbsent(component, this::getScmInfoForComponent);
  }
@Test
  public void fail_with_NPE_when_component_is_null() {
    assertThatThrownBy(() -> underTest.getScmInfo(null))
      .isInstanceOf(NullPointerException.class)
      .hasMessage("Component cannot be null");
  }