@Test
public void test_remove_pattern() {

    assertThat(Extension.removePattern(Extension.endsWithVersion,"my-extension")).isEqualTo("my-extension");
    assertThat(Extension.removePattern(Extension.endsWithVersion,"my-extension-1.2.3")).isEqualTo("my-extension");
    assertThat(Extension.removePattern(Extension.endsWithVersion,"extension.with.dot-1.0.0")).isEqualTo("extension.with.dot");
    assertThat(Extension.removePattern(Extension.endsWithExtension,"my-extension")).isEqualTo("my-extension");
    assertThat(Extension.removePattern(Extension.endsWithExtension,"my-extension.jar")).isEqualTo("my-extension");
    assertThat(Extension.removePattern(Extension.endsWithExtension,"my-extension-1.2.3")).isEqualTo("my-extension-1.2.3");
}