RsId { public static RsId of(int id) { if (id <= 0) { return EMPTY; } return new RsId(id); } private  RsId(int id); static RsId of(int id); static RsId of(String id); static RsId empty(); int getId(); boolean isEmpty(); @Override int hashCode(); @Override boolean equals(Object o); @Override String toString();  }
@Test public void testParseValidRsId() { assertThat(RsId.of("rs123456"), equalTo(RsId.of(123456))); }
@Test public void testParseRsIdFromStringInt() { assertThat(RsId.of("123456"), equalTo(RsId.of(123456))); }
@Test public void testValueOfInvalidThrowsException() { assertThrows(NumberFormatException.class, () -> RsId.of("wibble")); }