District implements AddressEntity, Comparable<District> { public String getProvinceCode() { return code.substring(0, 2); } District(String code, String name); @Override String getCode(); @Override String getName(); String getProvinceCode(); @Override int hashCode(); @Override boolean equals(Object other); @Override String toString(); @Override int compareTo(District that);  }
@Test public void getProvinceCode() { assertEquals("10", bangkok.getProvinceCode()); }