Best MockBukkit code snippet using be.seeseemelk.mockbukkit.scheduler.BukkitSchedulerMock.AtomicInteger
Source:BukkitSchedulerMockTest.java
...9import java.util.concurrent.CyclicBarrier;10import java.util.concurrent.TimeUnit;11import java.util.concurrent.TimeoutException;12import java.util.concurrent.atomic.AtomicBoolean;13import java.util.concurrent.atomic.AtomicInteger;14import be.seeseemelk.mockbukkit.MockBukkit;15import be.seeseemelk.mockbukkit.TestPlugin;16import org.bukkit.plugin.Plugin;17import org.bukkit.scheduler.BukkitTask;18import org.junit.jupiter.api.BeforeEach;19import org.junit.jupiter.api.Test;20class BukkitSchedulerMockTest21{22 private BukkitSchedulerMock scheduler;23 @BeforeEach24 public void setUp()25 {26 scheduler = new BukkitSchedulerMock();27 }28 @Test29 void getCurrentTick()30 {31 assertEquals(0, scheduler.getCurrentTick());32 scheduler.performOneTick();33 assertEquals(1, scheduler.getCurrentTick());34 scheduler.performTicks(2L);35 assertEquals(3, scheduler.getCurrentTick());36 }37 @Test38 void runTask()39 {40 AtomicBoolean executed = new AtomicBoolean(false);41 Runnable task = () -> executed.set(true);42 scheduler.runTask(null, task);43 assertFalse(executed.get());44 scheduler.performOneTick();45 assertTrue(executed.get());46 }47 @Test48 void runTaskLater()49 {50 AtomicBoolean executed = new AtomicBoolean(false);51 Runnable callback = () -> executed.set(true);52 BukkitTask task = scheduler.runTaskLater(null, callback, 20L);53 assertNotNull(task);54 assertFalse(executed.get());55 scheduler.performTicks(10L);56 assertFalse(executed.get());57 scheduler.performTicks(20L);58 assertTrue(executed.get());59 }60 @Test61 void runTaskTimer()62 {63 AtomicInteger count = new AtomicInteger(0);64 Runnable callback = () -> count.incrementAndGet();65 BukkitTask task = scheduler.runTaskTimer(null, callback, 10L, 2L);66 assertNotNull(task);67 scheduler.performTicks(9L);68 assertEquals(0, count.get());69 scheduler.performOneTick();70 assertEquals(1, count.get());71 scheduler.performOneTick();72 assertEquals(1, count.get());73 scheduler.performOneTick();74 assertEquals(2, count.get());75 task.cancel();76 scheduler.performOneTick();77 assertEquals(2, count.get());78 }79 private BukkitTask testTask; /* This is needed because a lambda can't reach writable closures */80 @Test81 void runTaskTimer_SelfCancelling()82 {83 AtomicInteger count = new AtomicInteger(0);84 testTask = scheduler.runTaskTimer(null, () ->85 {86 if (count.incrementAndGet() == 2)87 testTask.cancel();88 }, 1, 1);89 assertEquals(0, count.get());90 scheduler.performOneTick();91 assertEquals(1, count.get());92 scheduler.performOneTick();93 assertEquals(2, count.get());94 scheduler.performOneTick();95 assertEquals(2, count.get());96 }97 @Test98 void runTaskTimer_ZeroDelay_DoesntExecuteTaskImmediately()99 {100 AtomicInteger count = new AtomicInteger(0);101 Runnable callback = () -> count.incrementAndGet();102 scheduler.runTaskTimer(null, callback, 0, 2L);103 assertEquals(0, count.get());104 scheduler.performTicks(1L);105 assertEquals(1, count.get());106 }107 @Test108 void runTaskAsynchronously_TaskExecutedOnSeperateThread() throws InterruptedException, BrokenBarrierException, TimeoutException109 {110 final Thread mainThread = Thread.currentThread();111 CyclicBarrier barrier = new CyclicBarrier(2);112 scheduler.runTaskAsynchronously(null, () ->113 {114 assertNotEquals(mainThread, Thread.currentThread());115 try116 {117 barrier.await(3L, TimeUnit.SECONDS);118 }119 catch (InterruptedException | BrokenBarrierException | TimeoutException e)120 {121 throw new RuntimeException(e);122 }123 });124 barrier.await(3L, TimeUnit.SECONDS);125 }126 @Test127 void runTaskTimerAsynchronously_TaskExecutedOnSeperateThread() throws InterruptedException, BrokenBarrierException, TimeoutException128 {129 final Thread mainThread = Thread.currentThread();130 CyclicBarrier barrier = new CyclicBarrier(2);131 AtomicInteger count = new AtomicInteger();132 testTask = scheduler.runTaskTimerAsynchronously(null, () ->133 {134 assertNotEquals(mainThread, Thread.currentThread());135 try136 {137 if (count.incrementAndGet() == 2)138 testTask.cancel();139 barrier.await(3L, TimeUnit.SECONDS);140 }141 catch (InterruptedException | BrokenBarrierException | TimeoutException e)142 {143 testTask.cancel();144 throw new RuntimeException(e);145 }...
Source:TestScheduler.java
1package io.github.mooy1.infinitylib.common;2import java.util.concurrent.CompletableFuture;3import java.util.concurrent.ExecutionException;4import java.util.concurrent.atomic.AtomicBoolean;5import java.util.concurrent.atomic.AtomicInteger;6import org.junit.jupiter.api.AfterAll;7import org.junit.jupiter.api.BeforeAll;8import org.junit.jupiter.api.Test;9import be.seeseemelk.mockbukkit.MockBukkit;10import be.seeseemelk.mockbukkit.scheduler.BukkitSchedulerMock;11import io.github.mooy1.infinitylib.core.MockAddon;12import static io.github.mooy1.infinitylib.common.Scheduler.repeat;13import static io.github.mooy1.infinitylib.common.Scheduler.repeatAsync;14import static io.github.mooy1.infinitylib.common.Scheduler.run;15import static io.github.mooy1.infinitylib.common.Scheduler.runAsync;16import static org.junit.jupiter.api.Assertions.assertEquals;17import static org.junit.jupiter.api.Assertions.assertFalse;18import static org.junit.jupiter.api.Assertions.assertTrue;19class TestScheduler {20 private static BukkitSchedulerMock scheduler;21 @BeforeAll22 public static void load() {23 scheduler = MockBukkit.mock().getScheduler();24 MockBukkit.load(MockAddon.class);25 }26 @AfterAll27 public static void unload() {28 MockBukkit.unmock();29 }30 @Test31 void testRun() throws ExecutionException, InterruptedException {32 AtomicBoolean a = new AtomicBoolean();33 CompletableFuture<Boolean> b = new CompletableFuture<>();34 run(() -> a.set(true));35 runAsync(() -> b.complete(true));36 scheduler.performOneTick();37 assertTrue(a.get());38 assertTrue(b.get());39 }40 @Test41 void testRunDelayed() throws ExecutionException, InterruptedException {42 AtomicBoolean a = new AtomicBoolean();43 CompletableFuture<Boolean> b = new CompletableFuture<>();44 run(2, () -> a.set(true));45 runAsync(2, () -> b.complete(true));46 scheduler.performOneTick();47 assertFalse(a.get());48 assertFalse(b.isDone());49 scheduler.performOneTick();50 assertTrue(a.get());51 assertTrue(b.get());52 }53 @Test54 void testRepeat() throws ExecutionException, InterruptedException {55 int times = 5;56 AtomicInteger a = new AtomicInteger();57 AtomicInteger b = new AtomicInteger();58 CompletableFuture<Boolean> c = new CompletableFuture<>();59 repeat(1, a::incrementAndGet);60 repeatAsync(1, () -> {61 if (b.incrementAndGet() == times) {62 c.complete(true);63 }64 });65 for (int i = 0; i < times; i++) {66 scheduler.performOneTick();67 }68 assertEquals(times, a.get());69 assertTrue(c.get());70 }71 @Test72 void testRepeatDelayed() throws ExecutionException, InterruptedException {73 int times = 4;74 AtomicInteger a = new AtomicInteger();75 AtomicInteger b = new AtomicInteger();76 CompletableFuture<Boolean> c = new CompletableFuture<>();77 repeat(1, 2, a::incrementAndGet);78 repeatAsync(1, 2, () -> {79 if (b.incrementAndGet() == times) {80 c.complete(true);81 }82 });83 for (int i = 0; i < times + 1; i++) {84 scheduler.performOneTick();85 }86 assertEquals(times, a.get());87 assertTrue(c.get());88 }89}...
AtomicInteger
Using AI Code Generation
1package be.seeseemelk.mockbukkit.scheduler;2import java.util.concurrent.atomic.AtomicInteger;3import org.junit.Test;4import be.seeseemelk.mockbukkit.MockBukkit;5import be.seeseemelk.mockbukkit.ServerMock;6import be.seeseemelk.mockbukkit.scheduler.BukkitSchedulerMock;7public class BukkitSchedulerMockTest {8 public void testBukkitSchedulerMock() {9 ServerMock server = MockBukkit.mock();10 BukkitSchedulerMock scheduler = new BukkitSchedulerMock(server);11 AtomicInteger counter = new AtomicInteger();12 scheduler.runTaskLater(null, () -> counter.incrementAndGet(), 10);13 scheduler.advanceTime(10);14 MockBukkit.unmock();15 }16}17package be.seeseemelk.mockbukkit.scheduler;18import java.util.concurrent.atomic.AtomicInteger;19import org.junit.Test;20import be.seeseemelk.mockbukkit.MockBukkit;21import be.seeseemelk.mockbukkit.ServerMock;22import be.seeseemelk.mockbukkit.scheduler.BukkitTaskMock;23public class BukkitTaskMockTest {24 public void testBukkitTaskMock() {25 ServerMock server = MockBukkit.mock();26 BukkitTaskMock task = new BukkitTaskMock(server);27 AtomicInteger counter = new AtomicInteger();28 task.runTaskLater(null, () -> counter.incrementAndGet(), 10);29 task.advanceTime(10);30 MockBukkit.unmock();31 }32}33package be.seeseemelk.mockbukkit.scheduler;34import java.util.concurrent.atomic.AtomicInteger;35import org.junit.Test;36import be.seeseemelk.mockbukkit.MockBukkit;37import be.seeseemelk.mockbukkit.ServerMock;38import be.seeseemelk.mockbukkit.scheduler.SchedulerMock;39public class SchedulerMockTest {40 public void testSchedulerMock() {41 ServerMock server = MockBukkit.mock();42 SchedulerMock scheduler = new SchedulerMock(server);43 AtomicInteger counter = new AtomicInteger();44 scheduler.runTaskLater(null, () -> counter.incrementAndGet(), 10);45 scheduler.advanceTime(10);
AtomicInteger
Using AI Code Generation
1import be.seeseemelk.mockbukkit.scheduler.BukkitSchedulerMock;2import org.junit.jupiter.api.Test;3import java.util.concurrent.atomic.AtomicInteger;4import static org.junit.jupiter.api.Assertions.assertEquals;5public class TestAtomicInteger {6 public void testAtomicInteger() {7 BukkitSchedulerMock scheduler = new BukkitSchedulerMock();8 AtomicInteger atomicInteger = new AtomicInteger(0);9 scheduler.runTaskTimer(() -> atomicInteger.incrementAndGet(), 1, 1);10 scheduler.advanceTime(10);11 assertEquals(10, atomicInteger.get());12 }13}14 at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:39)15 at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:201)16 at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:189)17 at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:123)18 at TestAtomicInteger.testAtomicInteger(2.java:16)
AtomicInteger
Using AI Code Generation
1package com.github.seeseemelk.mockbukkit.scheduler;2import org.junit.jupiter.api.AfterEach;3import org.junit.jupiter.api.BeforeEach;4import org.junit.jupiter.api.Test;5import com.github.seeseemelk.mockbukkit.MockBukkit;6{7 private BukkitSchedulerMock scheduler;8 public void setUp()9 {10 scheduler = MockBukkit.getScheduler();11 }12 public void tearDown()13 {14 MockBukkit.unmock();15 }16 public void testAtomicInteger()17 {18 AtomicInteger atomicInteger = new AtomicInteger();19 scheduler.runTaskLater(null, () -> atomicInteger.incrementAndGet(), 1);20 scheduler.advanceTime(1);21 assertEquals(1, atomicInteger.get());22 }23}24package com.github.seeseemelk.mockbukkit.scheduler;25import org.junit.jupiter.api.AfterEach;26import org.junit.jupiter.api.BeforeEach;27import org.junit.jupiter.api.Test;28import com.github.seeseemelk.mockbukkit.MockBukkit;29{30 private BukkitSchedulerMock scheduler;31 public void setUp()32 {33 scheduler = MockBukkit.getScheduler();34 }35 public void tearDown()36 {37 MockBukkit.unmock();38 }39 public void testAtomicInteger()40 {41 AtomicInteger atomicInteger = new AtomicInteger();42 scheduler.runTaskLater(null, () -> atomicInteger.incrementAndGet(), 1);43 scheduler.advanceTime(1);44 assertEquals(1, atomicInteger.get());45 }46}47package com.github.seeseemelk.mockbukkit.scheduler;48import org.junit.jupiter.api.AfterEach;49import org.junit.jupiter.api.BeforeEach;50import org.junit.jupiter.api.Test;51import com.github.seeseemelk.mockbukkit.MockBukkit;52{53 private BukkitSchedulerMock scheduler;54 public void setUp()55 {56 scheduler = MockBukkit.getScheduler();57 }58 public void tearDown()59 {
AtomicInteger
Using AI Code Generation
1import be.seeseemelk.mockbukkit.scheduler.BukkitSchedulerMock;2import java.util.concurrent.atomic.AtomicInteger;3import org.junit.Test;4public class TestAtomicInteger {5 public void testAtomicInteger() {6 AtomicInteger atomicInteger = new AtomicInteger(0);7 BukkitSchedulerMock bukkitSchedulerMock = new BukkitSchedulerMock();8 bukkitSchedulerMock.runTaskTimer(null, () -> {9 atomicInteger.getAndIncrement();10 }, 0, 1);11 bukkitSchedulerMock.tick(20);12 System.out.println(atomicInteger.get());13 }14}
AtomicInteger
Using AI Code Generation
1package com.example.demo;2import org.bukkit.plugin.Plugin;3import org.junit.jupiter.api.BeforeEach;4import org.junit.jupiter.api.Test;5import org.junit.jupiter.api.extension.ExtendWith;6import org.mockito.Mock;7import org.mockito.junit.jupiter.MockitoExtension;8import be.seeseemelk.mockbukkit.scheduler.BukkitSchedulerMock;9import java.util.concurrent.atomic.AtomicInteger;10import static org.junit.jupiter.api.Assertions.assertEquals;11@ExtendWith(MockitoExtension.class)12public class TestAtomicInteger {13 private Plugin plugin;14 private AtomicInteger atomicInteger;15 public void setup() {16 atomicInteger = new AtomicInteger();17 }18 public void testAtomicInteger() {19 BukkitSchedulerMock scheduler = new BukkitSchedulerMock();20 scheduler.runTask(plugin, () -> atomicInteger.incrementAndGet());21 scheduler.tick();22 assertEquals(1, atomicInteger.get());23 }24}25package com.example.demo;26import org.bukkit.plugin.Plugin;27import org.junit.jupiter.api.BeforeEach;28import org.junit.jupiter.api.Test;29import org.junit.jupiter.api.extension.ExtendWith;30import org.mockito.Mock;31import org.mockito.junit.jupiter.MockitoExtension;32import be.seeseemelk.mockbukkit.scheduler.BukkitSchedulerMock;33import java.util.concurrent.atomic.AtomicInteger;34import static org.junit.jupiter.api.Assertions.assertEquals;35@ExtendWith(MockitoExtension.class)36public class TestAtomicInteger {37 private Plugin plugin;38 private AtomicInteger atomicInteger;39 public void setup() {40 atomicInteger = new AtomicInteger();41 }42 public void testAtomicInteger() {43 BukkitSchedulerMock scheduler = new BukkitSchedulerMock();44 scheduler.runTask(plugin, () -> atomicInteger.incrementAndGet());45 scheduler.tick();46 assertEquals(1, atomicInteger.get());47 }48}49package com.example.demo;50import org.bukkit.plugin.Plugin;51import org.junit.jupiter.api.BeforeEach;52import org.junit.jupiter.api.Test;53import org.junit.jupiter.api.extension.ExtendWith;54import org.mockito.Mock;55import org.mockito.junit.jupiter.MockitoExtension;56import
AtomicInteger
Using AI Code Generation
1import static org.junit.Assert.assertTrue;2import org.junit.Test;3import be.seeseemelk.mockbukkit.scheduler.BukkitSchedulerMock;4public class AtomicIntegerTest {5 public void testAtomicInteger() {6 BukkitSchedulerMock scheduler = new BukkitSchedulerMock();7 int id = scheduler.runTaskTimer(null, () -> {}, 1, 1).getTaskId();8 assertTrue(scheduler.isCurrentlyRunning(id));9 }10}11import static org.junit.Assert.assertTrue;12import org.junit.Test;13import be.seeseemelk.mockbukkit.scheduler.BukkitSchedulerMock;14public class AtomicIntegerTest {15 public void testAtomicInteger() {16 BukkitSchedulerMock scheduler = new BukkitSchedulerMock();17 int id = scheduler.runTaskTimer(null, () -> {}, 1, 1).getTaskId();18 assertTrue(scheduler.isCurrentlyRunning(id));19 }20}21import static org.junit.Assert.assertTrue;22import org.junit.Test;23import be.seeseemelk.mockbukkit.scheduler.BukkitSchedulerMock;24public class AtomicIntegerTest {25 public void testAtomicInteger() {26 BukkitSchedulerMock scheduler = new BukkitSchedulerMock();27 int id = scheduler.runTaskTimer(null, () -> {}, 1, 1).getTaskId();28 assertTrue(scheduler.isCurrentlyRunning(id));29 }30}31import static org.junit.Assert.assertTrue;32import org.junit.Test;33import be.seeseemelk.mockbukkit.scheduler.BukkitSchedulerMock;34public class AtomicIntegerTest {35 public void testAtomicInteger() {36 BukkitSchedulerMock scheduler = new BukkitSchedulerMock();37 int id = scheduler.runTaskTimer(null, () -> {}, 1, 1).getTaskId();38 assertTrue(scheduler.isCurrentlyRunning(id));39 }40}41import static org.junit.Assert.assertTrue;42import org.junit.Test;43import be
AtomicInteger
Using AI Code Generation
1import be.seeseemelk.mockbukkit.scheduler.BukkitSchedulerMock;2import be.seeseemelk.mockbukkit.scheduler.BukkitTaskMock;3import java.util.concurrent.atomic.AtomicInteger;4import org.bukkit.plugin.Plugin;5import org.bukkit.scheduler.BukkitRunnable;6import org.bukkit.scheduler.BukkitTask;7public class MockBukkitSchedulerMock {8 private final AtomicInteger nextTaskId = new AtomicInteger(1);9 private final BukkitSchedulerMock scheduler;10 public MockBukkitSchedulerMock(BukkitSchedulerMock scheduler) {11 this.scheduler = scheduler;12 }13 public BukkitTask runTask(Plugin plugin, Runnable runnable) {14 return scheduler.runTask(plugin, runnable);15 }16 public BukkitTask runTaskLater(Plugin plugin, Runnable runnable, long delay) {17 return scheduler.runTaskLater(plugin, runnable, delay);18 }19 public BukkitTask runTaskTimer(Plugin plugin, Runnable runnable, long delay, long period) {20 return scheduler.runTaskTimer(plugin, runnable, delay, period);21 }22 public BukkitTask runTask(Plugin plugin, BukkitRunnable bukkitRunnable) {23 return scheduler.runTask(plugin, bukkitRunnable);24 }25 public BukkitTask runTaskLater(Plugin plugin, BukkitRunnable bukkitRunnable, long delay) {26 return scheduler.runTaskLater(plugin, bukkitRunnable, delay);27 }28 public BukkitTask runTaskTimer(Plugin plugin, BukkitRunnable bukkitRunnable, long delay, long period) {29 return scheduler.runTaskTimer(plugin, bukkitRunnable, delay, period);30 }31 public BukkitTask runTaskAsynchronously(Plugin plugin, Runnable runnable) {32 return scheduler.runTaskAsynchronously(plugin, runnable);33 }34 public BukkitTask runTaskLaterAsynchronously(Plugin plugin, Runnable runnable, long delay) {35 return scheduler.runTaskLaterAsynchronously(plugin, runnable, delay);36 }37 public BukkitTask runTaskTimerAsynchronously(Plugin plugin, Runnable runnable, long delay, long period) {38 return scheduler.runTaskTimerAsynchronously(plugin, runnable, delay, period);39 }40 public BukkitTask runTaskAsynchronously(Plugin plugin, BukkitRunnable bukkitRunnable) {41 return scheduler.runTaskAsynchronously(plugin, bukkitRunnable);42 }43 public BukkitTask runTaskLaterAsynchronously(Plugin plugin, BukkitRunnable bukkitRunnable, long delay) {
AtomicInteger
Using AI Code Generation
1public class 2 {2 public static void main(String[] args) {3 BukkitSchedulerMock scheduler = new BukkitSchedulerMock();4 AtomicInteger id = new AtomicInteger();5 id.set(1);6 int id2 = id.get();7 scheduler.runTaskTimer(new Main(), 1, 1);8 scheduler.advanceTime(100);9 scheduler.runTaskTimer(new Main(), 1, 1);10 scheduler.advanceTime(100);11 assertEquals(id2, id.get());12 }13}14public class 2 {15 public static void main(String[] args) {16 BukkitSchedulerMock scheduler = new BukkitSchedulerMock();17 AtomicInteger id = new AtomicInteger();18 id.set(1);19 int id2 = id.get();20 scheduler.runTaskTimer(new Main(), 1, 1);21 scheduler.advanceTime(100);22 scheduler.runTaskTimer(new Main(), 1, 1);23 scheduler.advanceTime(100);24 assertEquals(id2, id.get());25 }26}27public class 2 {28 public static void main(String[] args) {29 BukkitSchedulerMock scheduler = new BukkitSchedulerMock();30 AtomicInteger id = new AtomicInteger();31 id.set(1);32 int id2 = id.get();33 scheduler.runTaskTimer(new Main(), 1, 1);34 scheduler.advanceTime(100);35 scheduler.runTaskTimer(new Main(), 1, 1);36 scheduler.advanceTime(100);37 assertEquals(id2, id.get());38 }39}40public class 2 {41 public static void main(String[] args) {42 BukkitSchedulerMock scheduler = new BukkitSchedulerMock();43 AtomicInteger id = new AtomicInteger();44 id.set(1);45 int id2 = id.get();46 scheduler.runTaskTimer(new Main(), 1, 1);47 scheduler.advanceTime(100);
AtomicInteger
Using AI Code Generation
1import be.seeseemelk.mockbukkit.scheduler.BukkitSchedulerMock;2import java.util.concurrent.atomic.AtomicInteger;3public class 2 {4 public static void main(String[] args) {5 BukkitSchedulerMock scheduler = new BukkitSchedulerMock();6 AtomicInteger atomicInteger = new AtomicInteger();7 scheduler.setAtomicInteger(atomicInteger, 0);8 System.out.println(atomicInteger.get());9 }10}11import be.seeseemelk.mockbukkit.scheduler.BukkitSchedulerMock;12import java.util.concurrent.atomic.AtomicInteger;13public class 3 {14 public static void main(String[] args) {15 BukkitSchedulerMock scheduler = new BukkitSchedulerMock();16 AtomicInteger atomicInteger = new AtomicInteger();17 scheduler.incrementAtomicInteger(atomicInteger);18 System.out.println(atomicInteger.get());19 }20}21import be.seeseemelk.mockbukkit.scheduler.BukkitSchedulerMock;22import java.util.concurrent.atomic.AtomicInteger;23public class 4 {24 public static void main(String[] args) {25 BukkitSchedulerMock scheduler = new BukkitSchedulerMock();26 AtomicInteger atomicInteger = new AtomicInteger();27 scheduler.decrementAtomicInteger(atomicInteger);28 System.out.println(atomicInteger
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!