### Question:
FabricBroker4Consumer extends FabricTopicAdmin implements IConsumer, IBlockChain { @Override public boolean unSubscribe(String subscriptionId) throws BrokerException { if (StringUtils.isBlank(subscriptionId)) { throw new BrokerException(ErrorCode.SUBSCRIPTIONID_IS_BLANK); } if (!this.subscriptions.containsKey(subscriptionId)) { log.warn("not exist subscriptionId {}", subscriptionId); throw new BrokerException(ErrorCode.SUBSCRIPTIONID_NOT_EXIST); } Subscription subscription = this.subscriptions.get(subscriptionId); this.mainEventLoops.get(subscription.getGroupId()).removeSubscription(subscription); this.subscriptions.remove(subscriptionId); log.info("unSubscribe success, subscriptionId {}", subscriptionId); return true; } FabricBroker4Consumer(FabricDelegate fabricDelegate); @Override String subscribe(String topic, String channelName, String offset,
                            @NonNull Map<SubscribeExt, String> ext,
                            @NonNull ConsumerListener listener); @Override String subscribe(String[] topics, String channelName, String offset,
                            @NonNull Map<SubscribeExt, String> ext,
                            @NonNull ConsumerListener listener); @Override boolean unSubscribe(String subscriptionId); @Override Map<String, SubscriptionInfo> listSubscription(String channnelName); @Override boolean isStarted(); @Override synchronized boolean startConsumer(); @Override synchronized boolean shutdownConsumer(); @Override int getIdleTime(); @Override Long getBlockHeight(String channelName); @Override boolean hasBlockEventNotify(); @Override List<WeEvent> loop(Long blockNum, String channelName);  }### Answer:
@Test public void testUnsubscribe01() { try { this.iConsumer.unSubscribe(null); Assert.fail(); } catch (BrokerException e) { Assert.assertEquals(e.getCode(), ErrorCode.SUBSCRIPTIONID_IS_BLANK.getCode()); } }