DataObjectFactory { public static String getRawJSON(Object obj) { Object json = rawJsonMap.get().get(obj); if (json instanceof String) { return (String) json; } else if (json != null) { return json.toString(); } else { return null; } } private  DataObjectFactory(); static String getRawJSON(Object obj); static Account createAccount(String rawJSON); static Achievement createAchievement(String rawJSON); static Activity createActivity(String rawJSON); static Admin createAdmin(String rawJSON); static Album createAlbum(String rawJSON); static Book createBook(String rawJSON); static Category createCategory(String rawJSON); static Checkin createCheckin(String rawJSON); static Comment createComment(String rawJSON); static Domain createDomain(String rawJSON); static Event createEvent(String rawJSON); static Family createFamily(String rawJSON); static Friend createFriend(String rawJSON); static Friendlist createFriendlist(String rawJSON); static FriendRequest createFriendRequest(String rawJSON); static Game createGame(String rawJSON); static GroupDoc createGroupDoc(String rawJSON); static Group createGroup(String rawJSON); static GroupMember createGroupMember(String rawJSON); static Insight createInsight(String rawJSON); static Interest createInterest(String rawJSON); static Like createLike(String rawJSON); static Link createLink(String rawJSON); static Location createLocation(String rawJSON); static Message createMessage(String rawJSON); static Milestone createMilestone(String rawJSON); static Movie createMovie(String rawJSON); static Music createMusic(String rawJSON); static Note createNote(String rawJSON); static Notification createNotification(String rawJSON); static Offer createOffer(String rawJSON); static Page createPage(String rawJSON); static PageSetting createPageSetting(String rawJSON); static Photo createPhoto(String rawJSON); static Place createPlace(String rawJSON); static Poke createPoke(String rawJSON); static Post createPost(String rawJSON); static Question createQuestion(String rawJSON); static QuestionVotes createQuestionVotes(String rawJSON); static RSVPStatus createRSVPStatus(String rawJSON); static Score createScore(String rawJSON); static Subscribedto createSubscribedto(String rawJSON); static Subscriber createSubscriber(String rawJSON); static Tab createTab(String rawJSON); static Tagged createTagged(String rawJSON); static Tag createTag(String rawJSON); static Television createTelevision(String rawJSON); static User createUser(String rawJSON); static Video createVideo(String rawJSON);  }
@Test public void getRawJSON() throws Exception { facebook.setMockJSON("mock_json/page/f4j.json"); Page page = facebook.getPage(); String rawJSON = DataObjectFactory.getRawJSON(page); assertThat(rawJSON, is(notNullValue())); }