package com.github.averyregier.club.domain.program.adapter;

/**
 * Created by rx39789 on 9/10/2014.
 */
public class Later<T> {
    private T value;
    public T get() {
        if(this.value == null) throw new IllegalStateException("value not yet set");
        return value;
    }
    public void set(T value) {
        if(this.value != null) throw new IllegalStateException("value is already set");
        this.value = value;
    }
}

@@ -164,34 +164,38 @@
 get() %7B%0A        
-if
+assert
 (this.value == n
@@ -202,61 +202,8 @@
 ull)
- throw new IllegalStateException(%22value not yet set%22)
 ;%0A  
@@ -271,10 +271,14 @@
     
-if
+assert
 (thi
@@ -297,64 +297,8 @@
 ull)
- throw new IllegalStateException(%22value is already set%22)
 ;%0A  

use an assertion