During OTN service testing on real equipment, we ran into the scenario where a transponder device was missing power range which result into failure of service.
We should update following if statement to first check if Transponder Port exists:
if (port.getTransponderPort().getPortPowerCapabilityMaxTx() != null) {
If transponder port doesn't exits then, we should use -5dB as default power on transponder.