### Question:
ProductionPanel implements Serializable { public static ProductionPanel from(Ui.ProductionPanel sc2ApiProductionPanel) { require("sc2api production panel", sc2ApiProductionPanel); return new ProductionPanel(sc2ApiProductionPanel); } private  ProductionPanel(Ui.ProductionPanel sc2ApiProductionPanel); static ProductionPanel from(Ui.ProductionPanel sc2ApiProductionPanel); UnitInfo getUnit(); List<UnitInfo> getBuildQueue(); List<BuildItem> getProductionQueue(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test void throwsExceptionWhenSc2ApiProductionPanelIsNull() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> ProductionPanel.from(nothing())) .withMessage("sc2api production panel is required"); }
@Test void convertsAllFieldsFromSc2ApiProductionPanel() { assertThatAllFieldsAreConverted(ProductionPanel.from(sc2ApiProductionPanel())); }
@Test void throwsExceptionWhenUnitIsNotProvided() { assertThatExceptionOfType(IllegalArgumentException.class) .isThrownBy(() -> ProductionPanel.from(without( () -> sc2ApiProductionPanel().toBuilder(), Ui.ProductionPanel.Builder::clearUnit).build())) .withMessage("unit is required"); }
@Test void fulfillsEqualsContract() { EqualsVerifier .forClass(ProductionPanel.class) .withNonnullFields("unit", "buildQueue", "productionQueue") .withPrefabValues(UnitInfo.class, UnitInfo.from(sc2ApiUnitInfoAddOn()), UnitInfo.from(sc2ApiUnitInfo())) .verify(); }