### Question:
ResourceConverterImpl implements ResourceConverter<ResourceType, ClientType> { protected void addValidExceptions(List<Exception> includedExceptions, List<Exception> allFoundExceptions, ToServerConversionOptions options) { boolean isAddAllExceptions = true; if (options.getAdditionalProperties() != null) { String[] values = options.getAdditionalProperties().get(ToServerConversionOptions.SKIP_DATA_BASE_METADATA_CHECK); if ((values != null) && (values.length > 0) && "true".equalsIgnoreCase(values[0])) { isAddAllExceptions = false; for (Exception ex : allFoundExceptions) { if (ex instanceof ErrorDescriptorException) { if (!((ErrorDescriptorException) ex).getErrorDescriptor().getErrorCode().equals(ResourceGroupProfileAttributeErrorDescriptor.ERROR_CODE)) { includedExceptions.add(ex); } } } } } if (isAddAllExceptions) { includedExceptions.addAll(allFoundExceptions); } } ResourceConverterImpl(); String getServerResourceType(); @Override ResourceType toServer(ClientType clientObject, ToServerConversionOptions options); @Override ResourceType toServer(ClientType clientObject, ResourceType resultToUpdate, ToServerConversionOptions options); @Override ClientType toClient(ResourceType serverObject, ToClientConversionOptions options); @SuppressWarnings("unchecked") Class<ClientType> getClientTypeClass(); String getClientResourceType();  }### Answer:
@Test public void addValidExceptions() { ArrayList<Exception> includedExceptions = new ArrayList<Exception>(); ArrayList<Exception> allFoundExceptions = new ArrayList<Exception>(); allFoundExceptions.add(new ErrorDescriptorException(new ResourceGroupProfileAttributeErrorDescriptor())); ToServerConversionOptions toServerConversionOptions = new ToServerConversionOptions(); HashMap<String, String[]> additionalProperties = new HashMap<String, String[]>(); additionalProperties.put(ToServerConversionOptions.SKIP_DATA_BASE_METADATA_CHECK, new String[]{"true"}); toServerConversionOptions.setAdditionalProperties(additionalProperties); converter.addValidExceptions(includedExceptions, allFoundExceptions, toServerConversionOptions); assertEquals(includedExceptions.size(), 0); }
@Test public void addValidExceptions_WithNullValues() { ArrayList<Exception> includedExceptions = new ArrayList<Exception>(); ArrayList<Exception> allFoundExceptions = new ArrayList<Exception>(); allFoundExceptions.add(new ErrorDescriptorException(new ResourceGroupProfileAttributeErrorDescriptor())); ToServerConversionOptions toServerConversionOptions = new ToServerConversionOptions(); HashMap<String, String[]> additionalProperties = new HashMap<String, String[]>(); additionalProperties.put(ToServerConversionOptions.SKIP_DATA_BASE_METADATA_CHECK, null); toServerConversionOptions.setAdditionalProperties(additionalProperties); converter.addValidExceptions(includedExceptions, allFoundExceptions, toServerConversionOptions); assertEquals(includedExceptions.size(), 0); }