### Question:
ContentResourceConverter extends ResourceConverterImpl<ContentResource, ClientFile> { @Override protected ContentResource resourceSpecificFieldsToServer(ClientFile clientObject, ContentResource resultToUpdate, List<Exception> exceptions, ToServerConversionOptions options) throws IllegalParameterValueException { if(resultToUpdate.getFileType() != null && (!resultToUpdate.getFileType().equals(clientObject.getType().name()) && !(ContentResource.TYPE_UNSPECIFIED.equals(resultToUpdate.getFileType()) && clientObject.getType().equals(ClientFile.FileType.unspecified)))){ throw new IllegalParameterValueException("type", clientObject.getType().name()); } if (ClientFile.FileType.unspecified.equals(clientObject.getType())){ resultToUpdate.setFileType(ContentResource.TYPE_UNSPECIFIED); } else { resultToUpdate.setFileType(clientObject.getType().name()); } if (clientObject.getContent() != null && !"".equals(clientObject.getContent())) { try { resultToUpdate.setData(DatatypeConverter.parseBase64Binary(clientObject.getContent())); } catch (IllegalArgumentException e) { throw new IllegalParameterValueException("content", ""); } } return resultToUpdate; }    }### Answer:
@Test public void resourceSpecificFieldsToServer() throws Exception{ final String expectedFileType = ContentResource.TYPE_ODS; final ClientFile clientObject = new ClientFile(); final ContentResource serverObject = new ContentResourceImpl(); clientObject.setType(ClientFile.FileType.ods); clientObject.setContent(encoded); final ContentResource result = converter.resourceSpecificFieldsToServer(clientObject, serverObject, new ArrayList<Exception>(), null); assertNotNull(result); assertEquals(result.getFileType(), expectedFileType); assertEquals(result.getData(), data); }