### Question:
BuildingMechanicsImpl implements BuildingMechanics { @Override public double calculateShipBuildTimeSpeedup(int level) { Preconditions.checkArgument(level >= 0, "level must be >= 0"); if (level == 0) { return 0; } return Math.min(1, (level - 1) * 0.1); } @Inject  BuildingMechanicsImpl(ResourcesMechanics resourcesMechanics); @Override Resources calculateCommandCenterResourcesGathered(int level); @Override Resources calculateBuildCost(BuildingType type, int level); @Override int calculateBuildTime(BuildingType type, int level); @Override int calculateCrystalsGathered(int level); @Override int calculateGasGathered(int level); @Override int calculateEnergyGathered(int level); @Override double calculateBuildingBuildTimeSpeedup(int level); @Override double calculateResearchTimeSpeedup(int level); @Override double calculateShipBuildTimeSpeedup(int level); @Override int calculateScanRange(int level); @Override int calculateFlightDetectionRange(int level); @Override Prerequisites getPrerequisites(BuildingType type); @Override long calculatePointsForConstructionSite(BuildingType type, int level); @Override long calculatePointsForBuilding(BuildingType type, int level); @Override double calculateFleetSizeVariance(int level);  }### Answer:
@Test public void testCalculateShipBuildTimeSpeedup() throws Exception { assertThat(sut.calculateShipBuildTimeSpeedup(1), is(0.0)); assertThat(sut.calculateShipBuildTimeSpeedup(2), is(0.1)); assertThat(sut.calculateShipBuildTimeSpeedup(3), is(0.2)); }