### Question:
ShipUtils { public double findSpeedOfSlowestShip(Ships ships, ShipMechanics shipMechanics) { Preconditions.checkNotNull(ships, "ships"); Preconditions.checkNotNull(shipMechanics, "shipMechanics"); return ships.asList().stream().mapToDouble(s -> shipMechanics.getFlightSpeed(s.getType())).min().getAsDouble(); }  long calculateStorageCapacity(Ships ships, ShipMechanics shipMechanics); double findSpeedOfSlowestShip(Ships ships, ShipMechanics shipMechanics); Hangar getOrCreateHangar(HangarDAO hangarDAO, UUIDFactory uuidFactory, UUID planetId, UUID playerId);  }### Answer:
@Test public void testFindSpeedOfSlowestShip() throws Exception { Ship daggers = new Ship(ShipType.DAGGER, 5); Ship mules = new Ship(ShipType.MULE, 2); Ships ships = new Ships(Arrays.asList(daggers, mules)); double actualSpeed = utils.findSpeedOfSlowestShip(ships, shipMechanics); double expectedSpeed = shipMechanics.getFlightSpeed(ShipType.DAGGER); if(shipMechanics.getFlightSpeed(ShipType.MULE) < expectedSpeed) { expectedSpeed = shipMechanics.getFlightSpeed(ShipType.MULE); } assertEquals(actualSpeed, expectedSpeed); }