### Question:
TransportOrderFilter implements Predicate<TransportOrder> { @Override public boolean test(TransportOrder transportOrder) { boolean accept = true; if (intendedVehicle != null && intendedVehicleDiffers(transportOrder.getIntendedVehicle())) { accept = false; } return accept; } TransportOrderFilter(String intendedVehicle); @Override boolean test(TransportOrder transportOrder);  }### Answer:
@Test public void acceptsAllForNoParams() { TransportOrderFilter emptyFilter = new TransportOrderFilter(null); assertTrue(emptyFilter.test(transportOrder1)); assertTrue(emptyFilter.test(transportOrder2)); assertTrue(emptyFilter.test(transportOrder3)); assertTrue(emptyFilter.test(transportOrder4)); assertTrue(emptyFilter.test(transportOrder5)); }
@Test public void detectsIntendedVehicle1() { TransportOrderFilter intendedVehicleFilter = new TransportOrderFilter(vehicle1Reference.getName()); assertTrue(intendedVehicleFilter.test(transportOrder1)); assertTrue(intendedVehicleFilter.test(transportOrder2)); assertFalse(intendedVehicleFilter.test(transportOrder3)); assertFalse(intendedVehicleFilter.test(transportOrder4)); assertFalse(intendedVehicleFilter.test(transportOrder5)); }