@Test
public void test_has_previous_version() throws Exception {

    File[] files = new File[] {extensionsDir.newFile("extension-1.0.0.jar")};
    assertThat(Extension.getPreviousVersionInstalled(files, "extension-0.1.0")).hasSize(1);
    assertThat(Extension.getPreviousVersionInstalled(files, "extension-1.1.0")).hasSize(1);
    assertThat(Extension.getPreviousVersionInstalled(files, "extension-1.1")).hasSize(1);
    assertThat(Extension.getPreviousVersionInstalled(files, "extension")).hasSize(1);
    assertThat(Extension.getPreviousVersionInstalled(files, "other-extension")).isEmpty();
    assertThat(Extension.getPreviousVersionInstalled(files, "extension-other-1.2.3")).isEmpty();
}