### Question:
ConsumerServiceImpl extends AbstractBaseService<ConsumerEntity> implements ConsumerService { @Override public void heartbeat(List<Long> ids) { if (!CollectionUtils.isEmpty(ids)) { consumerRepository.heartbeat(ids); } }  @Override @Transactional(rollbackFor = Exception.class) ConsumerRegisterResponse register(ConsumerRegisterRequest request); @Override @Transactional(rollbackFor = Exception.class) ConsumerDeRegisterResponse deRegister(ConsumerDeRegisterRequest deRegisterRequest); @Override void heartbeat(List<Long> ids); @Override List<ConsumerGroupConsumerEntity> getConsumerGroupByConsumerIds(List<Long> consumerIds); @Override List<ConsumerGroupConsumerEntity> getConsumerGroupByConsumerGroupIds(List<Long> consumerGroupIds); @Override //@Transactional(rollbackFor = Exception.class) ConsumerGroupRegisterResponse registerConsumerGroup(ConsumerGroupRegisterRequest request); @Override PublishMessageResponse publish(PublishMessageRequest request); void notifyClient(QueueEntity queueEntity); @Override PullDataResponse pullData(PullDataRequest request); @Override GetMessageCountResponse getMessageCount(GetMessageCountRequest request); @Override List<ConsumerEntity> findByHeartTimeInterval(long heartTimeInterval); @Override boolean deleteByConsumers(List<ConsumerEntity> consumers); @Override ConsumerEntity getConsumerByConsumerGroupId(Long consumerGroupId); @Override long countBy(Map<String, Object> conditionMap); @Override List<ConsumerEntity> getListBy(Map<String, Object> conditionMap); @Override FailMsgPublishAndUpdateResultResponse publishAndUpdateResultFailMsg(
            FailMsgPublishAndUpdateResultRequest request);  }### Answer:
@Test public void heartbeatTest() { consumerServiceImpl.heartbeat(Arrays.asList(1L)); verify(consumerRepository).heartbeat(anyListOf(Long.class)); }