String description = "item description";
String mimeType = "image/jpeg";
String thumbnailUrl = "http://thumbnail_url";
String type = "image";
String url = "http://url";
MediaItem item = new MediaItem();
item.setId(itemId);
item.setAlbumId(albumId);
item.setCaption(caption);
item.setDescription(description);
item.setMimeType(mimeType);
item.setThumbnailUrl(thumbnailUrl);
item.setType(type);
item.setUrl(url);
request = MediaItemsService.createMediaItem(item);
assertRequestValid(null, "mediaItems.create", "POST");
assertRequestComponent("@me", Request.GUID);
assertRequestComponent(albumId, Request.ALBUM_ID);