### Question:
OrderProjectImportAdapter implements FixtureAwareRowHandler<OrderProjectImportAdapter>, ExcelMetaDataEnabled { public String deriveOrderNumber() { if (getNumero() == null) return null; StringBuilder builder = new StringBuilder(); builder.append(getNumero().toString()); builder.append("/"); if (getCentro() != null) builder.append(getCentro()); builder.append("/"); if (getProgressivoCentro() != null && getCommessa() != null) { builder.append(getProgressivoCentro()); builder.append("/"); builder.append(getCommessa()); } else if (getCommessa() != null && getWorkType() != null) { builder.append(getCommessa()); builder.append("/"); builder.append(getWorkType()); } else { if (getProgressivoCentro() != null) { builder.append(getProgressivoCentro()); } builder.append("/"); if (getCommessa() != null) { builder.append(getCommessa()); } } return builder.toString(); }  OrderProjectImportAdapter handle(final OrderProjectImportAdapter previousRow); String deriveOrderNumber(); void correctProgressivoCentroIfNecessary(); String deriveProjectReference(); @Override void handleRow(final OrderProjectImportAdapter previousRow);  }### Answer:
@Test public void deriveOrderNumber() { OrderProjectImportAdapter adapter = new OrderProjectImportAdapter(); adapter.setNumero(2234); adapter.setCentro("CAR"); adapter.setProgressivoCentro("694"); adapter.setCommessa("192"); assertThat(adapter.deriveOrderNumber()).isEqualTo("2234/CAR/694/192"); }
@Test public void deriveOrderNumber_when_nulls_oldFormat() { OrderProjectImportAdapter adapter = new OrderProjectImportAdapter(); adapter.setNumero(null); adapter.setCentro("CAR"); adapter.setProgressivoCentro("694"); adapter.setCommessa("192"); adapter.setWorkType(null); assertThat(adapter.deriveOrderNumber()).isNull(); adapter.setNumero(2234); adapter.setCentro(null); adapter.setProgressivoCentro("694"); adapter.setCommessa("192"); adapter.setWorkType(null); assertThat(adapter.deriveOrderNumber()).isEqualTo("2234 adapter.setNumero(2234); adapter.setCentro("CAR"); adapter.setProgressivoCentro(null); adapter.setCommessa("192"); adapter.setWorkType(null); assertThat(adapter.deriveOrderNumber()).isEqualTo("2234/CAR adapter.setNumero(2234); adapter.setCentro("CAR"); adapter.setProgressivoCentro("694"); adapter.setCommessa(null); adapter.setWorkType(null); assertThat(adapter.deriveOrderNumber()).isEqualTo("2234/CAR/694/"); }
@Test public void deriveOrderNumber_when_nulls_newFormat() throws Exception { OrderProjectImportAdapter adapter = new OrderProjectImportAdapter(); adapter.setNumero(null); adapter.setCentro("CAR"); adapter.setProgressivoCentro(null); adapter.setCommessa("192"); adapter.setWorkType("001"); assertThat(adapter.deriveOrderNumber()).isNull(); adapter.setNumero(2234); adapter.setCentro(null); adapter.setProgressivoCentro(null); adapter.setCommessa("192"); adapter.setWorkType("001"); assertThat(adapter.deriveOrderNumber()).isEqualTo("2234 }