// Path: hazeltask-core/src/main/java/com/hazeltask/core/concurrent/BackoffTimer.java
// public static abstract class BackoffTask {
//     private boolean cancelled;
//         
//     /**
//      * 
//      * @return false to backoff the next time
//      */
//     public abstract boolean execute();
//         
//     public final void cancel() {
//         this.cancelled = true;
//     }
//         
//     public final boolean isCancelled() {
//         return cancelled;
//     }
// }


import org.junit.Test;
import com.hazeltask.core.concurrent.BackoffTimer.BackoffTask;
package com.hazeltask.core.concurrent;



//TODO: really implement this
public class BackoffTimerTest {

	static class OneSecondTask extends BackoffTask {
		@Override
		public boolean execute() {
			try {
				System.out.println("+");
				Thread.sleep(1000);
				System.out.println("-");
			} catch (InterruptedException e) {
				System.out.println("onesecond task inturrupted...");
			}
			return true;
		}		
	}
	
// Path: hazeltask-core/src/main/java/com/hazeltask/core/concurrent/BackoffTimer.java
// public static abstract class BackoffTask {
//     private boolean cancelled;
//         
//     /**
//      * 
//      * @return false to backoff the next time
//      */
//     public abstract boolean execute();
//         
//     public final void cancel() {
//         this.cancelled = true;
//     }
//         
//     public final boolean isCancelled() {
//         return cancelled;
//     }
// }


// Path: hazeltask-core/src/test/java/com/hazeltask/core/concurrent/BackoffTimerTest.java
import org.junit.Test;
import com.hazeltask.core.concurrent.BackoffTimer.BackoffTask;

package com.hazeltask.core.concurrent;



//TODO: really implement this
public class BackoffTimerTest {

	static class OneSecondTask extends BackoffTask {
		@Override
		public boolean execute() {
			try {
				System.out.println("+");
				Thread.sleep(1000);
				System.out.println("-");
			} catch (InterruptedException e) {
				System.out.println("onesecond task inturrupted...");
			}
			return true;
		}		
	}
	
	static class TenSecondTask extends BackoffTask {