@Test
 public void setPermsTest() {
   mockServer
       .expect(
           requestTo(
               "http://api.flickr.com/services/rest/?method=flickr.photos.setPerms&format=json&nojsoncallback=1"))
       .andExpect(method(POST))
       .andRespond(withSuccess(jsonResource("photoid"), MediaType.APPLICATION_JSON));
   Perms perms = new Perms();
   perms.setId("23");
   perms.setIsfamily(true);
   perms.setIsfriend(true);
   perms.setIspublic(true);
   perms.setPermaddmeta(PermissionEnum.CONTACTS);
   perms.setPermcomment(PermissionEnum.CONTACTS);
   PhotoId photoid = flickr.photoOperations().setPerms(perms);
   assertPhotoId(photoid);
 }
 private void assertPermission(Perms perms) {
   Assert.assertEquals("6955318342", perms.getId());
 }