public void verify() { if (transport.getVehicle() == null) { throw new TestErrorException("Transport.getVehicle() was null."); } if (transport.getVehicle().getTransientValue() == null) { throw new TestErrorException("TransientValue should not be null."); } }