@Test public void createCcCourtAreaFieldValue_parentAreaCourtId_NULL() { CommonCourt court = new CommonCourt(); Whitebox.setInternalState(court, "id", 12L); court.setName("Sąd Okręgowy w Lublinie"); String sep = CcCourtAreaFieldValueCreator.CC_COURT_AREA_VALUE_PART_SEPARATOR; String na = CcCourtAreaFieldValueCreator.NULL_PARENT_COURT_ID; when(fieldValuePrefixAdder.addFieldPrefix(na, "Sąd Okręgowy w Lublinie"+sep+"12")).thenReturn(na+"_Sąd Okręgowy w Lublinie"+sep+"12"); String ccCourtArea = ccCourtAreaFieldValueCreator.createCcCourtAreaFieldValue(null, court); assertEquals(na+"_Sąd Okręgowy w Lublinie"+sep+"12", ccCourtArea); }
public String createCcCourtAreaFieldValue(Long parentAreaCourtId, CommonCourt ccCourt) { Preconditions.checkNotNull(ccCourt); String ccCourtArea = ccCourt.getName() + CC_COURT_AREA_VALUE_PART_SEPARATOR + ccCourt.getId(); String parentAreaCourtIdStr = calcParentAreaCourtId(parentAreaCourtId); ccCourtArea = fieldValuePrefixAdder.addFieldPrefix(parentAreaCourtIdStr, ccCourtArea); return ccCourtArea; }
CcCourtAreaFieldValueCreator { public String createCcCourtAreaFieldValue(Long parentAreaCourtId, CommonCourt ccCourt) { Preconditions.checkNotNull(ccCourt); String ccCourtArea = ccCourt.getName() + CC_COURT_AREA_VALUE_PART_SEPARATOR + ccCourt.getId(); String parentAreaCourtIdStr = calcParentAreaCourtId(parentAreaCourtId); ccCourtArea = fieldValuePrefixAdder.addFieldPrefix(parentAreaCourtIdStr, ccCourtArea); return ccCourtArea; } }
CcCourtAreaFieldValueCreator { public String createCcCourtAreaFieldValue(Long parentAreaCourtId, CommonCourt ccCourt) { Preconditions.checkNotNull(ccCourt); String ccCourtArea = ccCourt.getName() + CC_COURT_AREA_VALUE_PART_SEPARATOR + ccCourt.getId(); String parentAreaCourtIdStr = calcParentAreaCourtId(parentAreaCourtId); ccCourtArea = fieldValuePrefixAdder.addFieldPrefix(parentAreaCourtIdStr, ccCourtArea); return ccCourtArea; }  }
CcCourtAreaFieldValueCreator { public String createCcCourtAreaFieldValue(Long parentAreaCourtId, CommonCourt ccCourt) { Preconditions.checkNotNull(ccCourt); String ccCourtArea = ccCourt.getName() + CC_COURT_AREA_VALUE_PART_SEPARATOR + ccCourt.getId(); String parentAreaCourtIdStr = calcParentAreaCourtId(parentAreaCourtId); ccCourtArea = fieldValuePrefixAdder.addFieldPrefix(parentAreaCourtIdStr, ccCourtArea); return ccCourtArea; }  String createCcCourtAreaFieldValue(Long parentAreaCourtId, CommonCourt ccCourt); }
CcCourtAreaFieldValueCreator { public String createCcCourtAreaFieldValue(Long parentAreaCourtId, CommonCourt ccCourt) { Preconditions.checkNotNull(ccCourt); String ccCourtArea = ccCourt.getName() + CC_COURT_AREA_VALUE_PART_SEPARATOR + ccCourt.getId(); String parentAreaCourtIdStr = calcParentAreaCourtId(parentAreaCourtId); ccCourtArea = fieldValuePrefixAdder.addFieldPrefix(parentAreaCourtIdStr, ccCourtArea); return ccCourtArea; }  String createCcCourtAreaFieldValue(Long parentAreaCourtId, CommonCourt ccCourt); static final String CC_COURT_AREA_VALUE_PART_SEPARATOR; static final String NULL_PARENT_COURT_ID; }