@Override @Test public void withTime() { Device device = createDevice(); Port port = new DefaultPort(device, PortNumber.portNumber(123), true); DeviceEvent event = new DeviceEvent(DeviceEvent.Type.DEVICE_ADDED, device, port, 123L); validateEvent(event, DeviceEvent.Type.DEVICE_ADDED, device, 123L); assertEquals("incorrect port", port, event.port()); }
public Port port() { return port; }
DeviceEvent extends AbstractEvent<DeviceEvent.Type, Device> { public Port port() { return port; } }
DeviceEvent extends AbstractEvent<DeviceEvent.Type, Device> { public Port port() { return port; } DeviceEvent(Type type, Device device);  DeviceEvent(Type type, Device device, Port port);  DeviceEvent(Device device, boolean isAvailable);  DeviceEvent(Type type, Device device, Port port, long time); }
DeviceEvent extends AbstractEvent<DeviceEvent.Type, Device> { public Port port() { return port; } DeviceEvent(Type type, Device device);  DeviceEvent(Type type, Device device, Port port);  DeviceEvent(Device device, boolean isAvailable);  DeviceEvent(Type type, Device device, Port port, long time); Port port(); Optional<Boolean> isAvailable(); @Override String toString(); }
DeviceEvent extends AbstractEvent<DeviceEvent.Type, Device> { public Port port() { return port; } DeviceEvent(Type type, Device device);  DeviceEvent(Type type, Device device, Port port);  DeviceEvent(Device device, boolean isAvailable);  DeviceEvent(Type type, Device device, Port port, long time); Port port(); Optional<Boolean> isAvailable(); @Override String toString();  }