@Test public void willReturnEmptyMap() { DriverMap driverMap = new DriverMap(); Map versionMap = driverMap.getMapForDriverContext(binaryDataFor(OSX, GOOGLECHROME, ARCHITECTURE_64_BIT)); assertThat(versionMap, is(instanceOf(TreeMap.class))); assertThat(versionMap.size(), is(equalTo(0))); }
public TreeMap<String, DriverDetails> getMapForDriverContext(DriverContext driverContext) { if (!repository.containsKey(driverContext)) { repository.put(driverContext, new TreeMap<String, DriverDetails>()); } return repository.get(driverContext); }
DriverMap { public TreeMap<String, DriverDetails> getMapForDriverContext(DriverContext driverContext) { if (!repository.containsKey(driverContext)) { repository.put(driverContext, new TreeMap<String, DriverDetails>()); } return repository.get(driverContext); } }
DriverMap { public TreeMap<String, DriverDetails> getMapForDriverContext(DriverContext driverContext) { if (!repository.containsKey(driverContext)) { repository.put(driverContext, new TreeMap<String, DriverDetails>()); } return repository.get(driverContext); }  }
DriverMap { public TreeMap<String, DriverDetails> getMapForDriverContext(DriverContext driverContext) { if (!repository.containsKey(driverContext)) { repository.put(driverContext, new TreeMap<String, DriverDetails>()); } return repository.get(driverContext); }  TreeMap<String, DriverDetails> getMapForDriverContext(DriverContext driverContext); DriverDetails getDetailsForVersionOfDriverContext(DriverContext driverContext, String version); DriverDetails getDetailsForLatestVersionOfDriverContext(DriverContext driverContext); Set<DriverContext> getKeys(); Set<String> getAvailableVersionsForDriverContext(DriverContext driverContext); ArrayList<DriverContext> getDriverContextsForOperatingSystem(OperatingSystem operatingSystem, SystemArchitecture systemArchitecture); ArrayList<DriverContext> getDriverContextsForCurrentOperatingSystem(); }
DriverMap { public TreeMap<String, DriverDetails> getMapForDriverContext(DriverContext driverContext) { if (!repository.containsKey(driverContext)) { repository.put(driverContext, new TreeMap<String, DriverDetails>()); } return repository.get(driverContext); }  TreeMap<String, DriverDetails> getMapForDriverContext(DriverContext driverContext); DriverDetails getDetailsForVersionOfDriverContext(DriverContext driverContext, String version); DriverDetails getDetailsForLatestVersionOfDriverContext(DriverContext driverContext); Set<DriverContext> getKeys(); Set<String> getAvailableVersionsForDriverContext(DriverContext driverContext); ArrayList<DriverContext> getDriverContextsForOperatingSystem(OperatingSystem operatingSystem, SystemArchitecture systemArchitecture); ArrayList<DriverContext> getDriverContextsForCurrentOperatingSystem();  }