4849505152535455
att.setTitle(null); } @Test(expected = IllegalArgumentException.class) public void shouldNotAllowNullSetterMimeType() throws Exception { Attachment att = new Attachment("", "", new URL("http://geekseek.org")); att.setMimeType(null); }
5455565758596061
att.setMimeType(null); } @Test(expected = IllegalArgumentException.class) public void shouldNotAllowNullSetterUrl() throws Exception { Attachment att = new Attachment("", "", new URL("http://geekseek.org")); att.setUrl(null); }
2223242526272829303132
return rep; } @Override public Attachment to(UriInfo uriInfo, AttachmentRepresentation representation) { Attachment attachment = new Attachment( representation.getTitle(), representation.getMimeType(), representation.getUrl()); return attachment; }