### Question:
AbstractDriverProductWriterPlugIn implements ProductWriterPlugIn { @Override public final EncodeQualification getEncodeQualification(Product product) { if (product != null && product.isMultiSize()) { return new EncodeQualification(EncodeQualification.Preservation.UNABLE, "Cannot write multisize products. Consider resampling the product first."); } if (GDALInstallInfo.INSTANCE.isPresent()) { return new EncodeQualification(EncodeQualification.Preservation.FULL); } return new EncodeQualification(EncodeQualification.Preservation.UNABLE); } protected  AbstractDriverProductWriterPlugIn(String fileExtension, String driverName, String driverDisplayName, String creationDataTypes); @Override final String getDescription(Locale locale); @Override final String[] getFormatNames(); @Override final String[] getDefaultFileExtensions(); @Override final SnapFileFilter getProductFileFilter(); @Override final EncodeQualification getEncodeQualification(Product product); @Override final Class[] getOutputTypes(); @Override final ProductWriter createWriterInstance(); final GDALDriverInfo getWriterDriver();  }### Answer:
@Test public void testEncodingQualificationWithNullProduct() { if (GDALInstallInfo.INSTANCE.isPresent()) { EncodeQualification encodeQualification = this.writerPlugIn.getEncodeQualification(null); assertNotNull(encodeQualification); assertEquals(EncodeQualification.Preservation.FULL, encodeQualification.getPreservation()); } }
@Test public void testEncodingQualificationWithNonNullProduct() { if (GDALInstallInfo.INSTANCE.isPresent()) { Product product = new Product("tempProduct", getFormatNameToCheck(), 20, 30); product.setPreferredTileSize(JAI.getDefaultTileSize()); EncodeQualification encodeQualification = this.writerPlugIn.getEncodeQualification(product); assertNotNull(encodeQualification); assertEquals(EncodeQualification.Preservation.FULL, encodeQualification.getPreservation()); } }