NetworkUpdateTemplate extends AbstractTemplate implements NetworkUpdateOperations { public void unlikeNetworkUpdate(String updateKey) { restOperations.put(UPDATE_IS_LIKED_URL, Boolean.FALSE, updateKey); } NetworkUpdateTemplate(RestOperations restOperations); List<LinkedInNetworkUpdate> getNetworkUpdates(); List<LinkedInNetworkUpdate> getNetworkUpdates(int start, int count); List<LinkedInNetworkUpdate> getNetworkUpdates(NetworkUpdateParameters parameters); List<Comment> getNetworkUpdateComments(String updateKey); void createNetworkUpdate(String update); CurrentShare getCurrentShare(); URI share(NewShare share); void likeNetworkUpdate(String updateKey); void unlikeNetworkUpdate(String updateKey); void commentOnNetworkUpdate(String updateKey, String comment); List<LinkedInProfile> getNetworkUpdateLikes(String updateKey); String getNetworkUpdatesJson(NetworkUpdateParameters parameters); static final int DEFAULT_START; static final int DEFAULT_COUNT; }
@Test public void unlike() { mockServer.expect(requestTo("https: .andExpect(method(PUT)) .andExpect(content().string("false")) .andRespond(withSuccess("", MediaType.APPLICATION_JSON)); linkedIn.networkUpdateOperations().unlikeNetworkUpdate("KEY"); }