class District implements AddressEntity, Comparable<District> {

    public String getProvinceCode() {
        return code.substring(0, 2);
    }

}

class DistrictTest {

    private District bangkok;

    @Test
    public void getProvinceCode() {

        assertEquals("10", bangkok.getProvinceCode());
    }

}