### Question:
ShardService { public List<Shard> getAllShards() { return shardDao.getAllShard(); } @Inject  ShardService(ShardDao shardDao, BlockchainProcessor blockchainProcessor, Blockchain blockchain,
                        DirProvider dirProvider, Zip zip, DatabaseManager databaseManager,
                        BlockchainConfig blockchainConfig, ShardRecoveryDao shardRecoveryDao,
                        ShardMigrationExecutor shardMigrationExecutor, AplAppStatus aplAppStatus,
                        PropertiesHolder propertiesHolder, Event<TrimConfig> trimEvent, GlobalSync globalSync,
                        TrimService trimService, Event<DbHotSwapConfig> dbEvent); List<Shard> getAllCompletedShards(); List<Shard> getAllCompletedOrArchivedShards(); List<Shard> getAllShards(); boolean isSharding(); void setSharding(boolean sharding); boolean reset(long shardId); void recoverSharding(); MigrateState performSharding(int minRollbackHeight, long shardId, MigrateState initialState); CompletableFuture<MigrateState> tryCreateShardAsync(int lastTrimBlockHeight, int blockchainHeight); @Transactional void saveShardRecoveryAndShard(long nextShardId, int lastTrimBlockHeight, int blockchainHeight); Shard getLastShard(); List<Shard> getShardsByBlockHeightRange(int heightFrom, int heightTo); final static long LOWER_SHARDING_MEMORY_LIMIT; }### Answer:
@Test void testGetAllShards() { doReturn(List.of()).when(shardDao).getAllShard(); List<Shard> allShards = shardService.getAllShards(); assertEquals(List.of(), allShards); verify(shardDao).getAllShard(); }