public static class Apteka implements Runnable {
        @Override
        public void run()
        {
            while(!isStopped)
            {
                {
                    drugsController.buy(getRandomDrug(), getRandomCount());
                    try {
                        Thread.sleep(300);
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                    waitAMoment();
                }
            }
        }
    }