@Test(expected = IllegalArgumentException.class) public void testValidateWithNullImage() throws Exception { ImageAndMask imageAndMask = new ImageAndMask(); imageAndMask.validate(); }
public void validate() throws IllegalArgumentException { if (imageUrl == null) { throw new IllegalArgumentException("no imageUrl specified"); } final URI imageUri = getUri(imageUrl); validateFile(imageUri, "imageUrl"); validatedImageUrl = getUrlString(imageUri); if (maskUrl != null) { final URI maskUri = getUri(maskUrl); validateFile(maskUri, "maskUrl"); validatedMaskUrl = getUrlString(maskUri); } }
ImageAndMask implements Serializable { public void validate() throws IllegalArgumentException { if (imageUrl == null) { throw new IllegalArgumentException("no imageUrl specified"); } final URI imageUri = getUri(imageUrl); validateFile(imageUri, "imageUrl"); validatedImageUrl = getUrlString(imageUri); if (maskUrl != null) { final URI maskUri = getUri(maskUrl); validateFile(maskUri, "maskUrl"); validatedMaskUrl = getUrlString(maskUri); } } }
ImageAndMask implements Serializable { public void validate() throws IllegalArgumentException { if (imageUrl == null) { throw new IllegalArgumentException("no imageUrl specified"); } final URI imageUri = getUri(imageUrl); validateFile(imageUri, "imageUrl"); validatedImageUrl = getUrlString(imageUri); if (maskUrl != null) { final URI maskUri = getUri(maskUrl); validateFile(maskUri, "maskUrl"); validatedMaskUrl = getUrlString(maskUri); } } ImageAndMask();  ImageAndMask(final String imageUrl,
                        final String maskUrl);  ImageAndMask(final File imageFile,
                        final File maskFile); }
ImageAndMask implements Serializable { public void validate() throws IllegalArgumentException { if (imageUrl == null) { throw new IllegalArgumentException("no imageUrl specified"); } final URI imageUri = getUri(imageUrl); validateFile(imageUri, "imageUrl"); validatedImageUrl = getUrlString(imageUri); if (maskUrl != null) { final URI maskUri = getUri(maskUrl); validateFile(maskUri, "maskUrl"); validatedMaskUrl = getUrlString(maskUri); } } ImageAndMask();  ImageAndMask(final String imageUrl,
                        final String maskUrl);  ImageAndMask(final File imageFile,
                        final File maskFile); boolean hasImage(); String getImageUrl(); String getImageFilePath(); boolean hasMask(); String getMaskUrl(); String getMaskFilePath(); @Override String toString(); void validate(); }
ImageAndMask implements Serializable { public void validate() throws IllegalArgumentException { if (imageUrl == null) { throw new IllegalArgumentException("no imageUrl specified"); } final URI imageUri = getUri(imageUrl); validateFile(imageUri, "imageUrl"); validatedImageUrl = getUrlString(imageUri); if (maskUrl != null) { final URI maskUri = getUri(maskUrl); validateFile(maskUri, "maskUrl"); validatedMaskUrl = getUrlString(maskUri); } } ImageAndMask();  ImageAndMask(final String imageUrl,
                        final String maskUrl);  ImageAndMask(final File imageFile,
                        final File maskFile); boolean hasImage(); String getImageUrl(); String getImageFilePath(); boolean hasMask(); String getMaskUrl(); String getMaskFilePath(); @Override String toString(); void validate();  }