// Path: src/main/java/de/skuzzle/inject/async/schedule/annotation/SimpleScheduleType.java
// public enum SimpleScheduleType {
//     /**
//      * Used to schedule a command using
//      * {@link ScheduledExecutorService#scheduleAtFixedRate(Runnable, long, long, TimeUnit)}
//      * .
//      */
//     AT_FIXED_RATE {
// 
//         @Override
//         public ScheduledFuture<?> schedule(ScheduledExecutorService scheduler, 
//                 Runnable command, long initialDelay, long period, TimeUnit unit) {
//             return scheduler.scheduleAtFixedRate(command, initialDelay, period, unit);
//         }
// 
//     },
//     /**
//      * Used to schedule a command using
//      * {@link ScheduledExecutorService#scheduleAtFixedRate(Runnable, long, long, TimeUnit)}
//      */
//     WITH_FIXED_DELAY {
//         @Override
//         public ScheduledFuture<?> schedule(ScheduledExecutorService scheduler, 
//                 Runnable command, long initialDelay, long delay, TimeUnit unit) {
//             return scheduler.scheduleWithFixedDelay(command, initialDelay, delay, unit);
//         }
//     };
// 
//     /**
//      * Schedules a {@link Runnable} according to this scheduling type.
//      *
//      * @param scheduler The scheduler to schedule the command with.
//      * @param command The command to schedule.
//      * @param initialDelay The initial delay.
//      * @param rate The scheduling rate.
//      * @param unit Time unit in which rate and delay are interpreted.
//      * @return The future object.
//      */
//     public abstract ScheduledFuture<?> schedule(ScheduledExecutorService scheduler, 
//             Runnable command, long initialDelay, long rate, TimeUnit unit);
// }


import static org.mockito.Mockito.verify;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import de.skuzzle.inject.async.schedule.annotation.SimpleScheduleType;
package de.skuzzle.inject.async.schedule.annotation;





@RunWith(MockitoJUnitRunner.class)
public class SimpleScheduleTypeTest {

    @Mock
    private ScheduledExecutorService scheduler;
    @Mock
    private Runnable command;

    @Before
    public void setUp() throws Exception {}

    @Test
    public void testAtFixedRate() throws Exception {
        SimpleScheduleType.AT_FIXED_RATE.schedule(this.scheduler, this.command, 5, 6,
                TimeUnit.MINUTES);
        verify(this.scheduler).scheduleAtFixedRate(this.command, 5, 6, TimeUnit.MINUTES);
    }

    @Test
    public void testWithFixedDelay() throws Exception {
// Path: src/main/java/de/skuzzle/inject/async/schedule/annotation/SimpleScheduleType.java
// public enum SimpleScheduleType {
//     /**
//      * Used to schedule a command using
//      * {@link ScheduledExecutorService#scheduleAtFixedRate(Runnable, long, long, TimeUnit)}
//      * .
//      */
//     AT_FIXED_RATE {
// 
//         @Override
//         public ScheduledFuture<?> schedule(ScheduledExecutorService scheduler, 
//                 Runnable command, long initialDelay, long period, TimeUnit unit) {
//             return scheduler.scheduleAtFixedRate(command, initialDelay, period, unit);
//         }
// 
//     },
//     /**
//      * Used to schedule a command using
//      * {@link ScheduledExecutorService#scheduleAtFixedRate(Runnable, long, long, TimeUnit)}
//      */
//     WITH_FIXED_DELAY {
//         @Override
//         public ScheduledFuture<?> schedule(ScheduledExecutorService scheduler, 
//                 Runnable command, long initialDelay, long delay, TimeUnit unit) {
//             return scheduler.scheduleWithFixedDelay(command, initialDelay, delay, unit);
//         }
//     };
// 
//     /**
//      * Schedules a {@link Runnable} according to this scheduling type.
//      *
//      * @param scheduler The scheduler to schedule the command with.
//      * @param command The command to schedule.
//      * @param initialDelay The initial delay.
//      * @param rate The scheduling rate.
//      * @param unit Time unit in which rate and delay are interpreted.
//      * @return The future object.
//      */
//     public abstract ScheduledFuture<?> schedule(ScheduledExecutorService scheduler, 
//             Runnable command, long initialDelay, long rate, TimeUnit unit);
// }


// Path: src/test/java/de/skuzzle/inject/async/schedule/annotation/SimpleScheduleTypeTest.java
import static org.mockito.Mockito.verify;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import de.skuzzle.inject.async.schedule.annotation.SimpleScheduleType;

package de.skuzzle.inject.async.schedule.annotation;





@RunWith(MockitoJUnitRunner.class)
public class SimpleScheduleTypeTest {

    @Mock
    private ScheduledExecutorService scheduler;
    @Mock
    private Runnable command;

    @Before
    public void setUp() throws Exception {}

    @Test
    public void testAtFixedRate() throws Exception {
        SimpleScheduleType.AT_FIXED_RATE.schedule(this.scheduler, this.command, 5, 6,
                TimeUnit.MINUTES);
        verify(this.scheduler).scheduleAtFixedRate(this.command, 5, 6, TimeUnit.MINUTES);
    }

    @Test
    public void testWithFixedDelay() throws Exception {
        SimpleScheduleType.WITH_FIXED_DELAY.schedule(this.scheduler, this.command, 5, 6,