Port { @Value.Lazy public boolean lessOrEqualsTo(Port port) { return value() <= port.value(); }  @Value.Parameter abstract int value(); @Value.Lazy boolean empty(); @Value.Lazy boolean greaterOrEqualsTo(Port port); @Value.Lazy boolean lessOrEqualsTo(Port port);  }
@Test public void less_than() throws Exception { assertThat(ImmutablePort.of(8001).lessOrEqualsTo(ImmutablePort.of(8001))).isTrue(); assertThat(ImmutablePort.of(8001).lessOrEqualsTo(ImmutablePort.of(8002))).isTrue(); assertThat(ImmutablePort.of(8001).lessOrEqualsTo(ImmutablePort.of(8000))).isFalse(); }