### Question:
ArchiveSpec { public boolean matches(String version, OperatingSystem operatingSystem) { return VersionUtil.isWithin(versionNumberOnly(version), this.versionSpec) && this.operatingSystemSpec.matches(operatingSystem); } @JsonCreator  ArchiveSpec(@JsonProperty("version") String versionSpec,
                     @JsonProperty("operatingSystem") OperatingSystemSpec operatingSystemSpec); String getVersionSpec(); OperatingSystemSpec getOperatingSystemSpec(); boolean matches(String version, OperatingSystem operatingSystem);  }### Answer:
@Test public void testMatches_OsAndVersionMatches() { when(operatingSystemSpec.matches(operatingSystem)).thenReturn(true); assertThat(archiveSpec.matches("2.0", operatingSystem)).isTrue(); }
@Test public void testMatches_OnlyVersionMatches() { assertThat(archiveSpec.matches("2.0", operatingSystem)).isFalse(); }
@Test public void testMatches_NoMatches() { assertThat(archiveSpec.matches("1.5", operatingSystem)).isFalse(); }