### Question:
SubscriptionTemplate extends AbstractYammerOperations implements SubscriptionOperations { public boolean isFollowingTopic(long topicId) { return isFollowing(buildUri("subscriptions/to_topic/"+ topicId + ".json")); } SubscriptionTemplate(RestTemplate restTemplate); void followUser(long userId); void followTopic(long topicId); void unfollowUser(long userId); void unfollowTopic(long topicId); boolean isFollowingUser(long userId); boolean isFollowingTopic(long topicId); boolean isFollowingThread(long threadId);  }### Answer:
@Test public void testIsFollowingTopic(){ mockServer.expect(requestTo("https: .andExpect(method(GET)) .andRespond(withSuccess("",APPLICATION_JSON)); boolean followingUser = yammerTemplate.subscriptionOperations().isFollowingTopic(123L); assertThat(followingUser, is(true)); }
@Test public void testIsFollowingTopic_404Respons(){ mockServer.expect(requestTo("https: .andExpect(method(GET)) .andRespond(withStatus(HttpStatus.NOT_FOUND)); boolean followingUser = yammerTemplate.subscriptionOperations().isFollowingTopic(123L); assertThat(followingUser, is(false)); }