import org.junit.*;
import org.junit.rules.*;
import static org.junit.Assert.*;
import java.lang.reflect.*;
import java.lang.*;
import java.util.*;
import java.io.*;
import asp.*;

@Exercises({ @Ex(exID = "GA4.6a", points = 12.5)})
@Forbidden({"java.util.", "java.math.BigInteger"})
@NotForbidden({"java.util.HashMap", "java.util.LinkedList"})
public class ExampleTestcase {
	// instead of explicitly coding the following rules here,
	// your test class can also just extend the class JUnitWithPoints
	@Rule
	public final PointsLogger pointsLogger = new PointsLogger();
	@ClassRule
	public final static PointsSummary pointsSummary = new PointsSummary();

	@Test(timeout=100)
	@Bonus(exID = "GA4.6a", bonus = 47.11)
	@Replace({"Student.foo"})
	public void testFooShouldReturn4711() { // correct in both
		assertEquals("Foo ist kaputt.", 4711, 4711);
	}

	@Test(timeout=100)
	@Bonus(exID = "GA4.6a", bonus = 47.11)
	@Replace({"Student.foo"})
	@SecretCase
	public void testFooShouldReturn4711_2() { // correct in student
		assertEquals("Foo ist kaputt.", 4712, (new Student()).foo());
	}

	@Test(timeout=100)
	@Bonus(exID = "GA4.6a", bonus = 47.11)
	@Replace({"Student.foo"})
	@SecretCase
	public void testFooShouldReturn4711_3() { // correct in both
		assertEquals("Foo ist kaputt.", (new Student()).foo(), (new Student()).foo());
	}

	@Test(timeout=100)
	@Bonus(exID = "GA4.6a", bonus = 47.11)
	@Replace({"Student.foo"})
	@SecretCase
	public void testFooShouldReturn4711_4() { // wrong in both
		assertEquals("Foo ist kaputt.", 23, 42);
	}

	@Test(timeout=100)
	@Bonus(exID = "GA4.6a", bonus = 4.11)
	@Replace({"Student.foo", "Student.recur"})
	@SecretCase
	public void testFooShouldReturn4711_5() { // correct in clean
		assertEquals("Foo ist kaputt.", 4711, (new Student()).foo());
	}

}

@@ -174,16 +174,833 @@
 asp.*;%0A%0A
+@UsageRestriction(%0A   mustUse = %7B%0A%09   @MustUse(classname=%22Student%22, methods=%7B%22recur%5C%5C(int%5C%5C)%22%7D, usable=%7B%22// Method recur:%5C%5C(I%5C%5C)V%22%7D, malus=1, exID=%22GA4.6a%22), // shall succeed%0A%09   @MustUse(classname=%22Student%22, methods=%7B%22recur%5C%5C(int%5C%5C)%22%7D, usable=%7B%22// Field testVariable:I%22%7D, malus=1, exID=%22GA4.6a%22) // shall not succeed%0A   %7D,%0A   mustNotUse=%7B%0A%09   @MustNotUse(classname=%22Student%22, methods=%7B%22recur%5C%5C(int, double%5C%5C)%22%7D, notUsable=%7B%22// Field testVariable:I%22%7D, malus=2, exID=%22GA4.6a%22), // shall succeed%0A%09   @MustNotUse(classname=%22Student%22, methods=%7B%22recur%5C%5C(int, double%5C%5C)%22%7D, notUsable=%7B%22// Method recur:%5C%5C(I%5C%5C)V%22%7D, malus=2, exID=%22GA4.6a%22),  // shall succeed%0A%09   @MustNotUse(classname=%22Student%22, methods=%7B%22recur%5C%5C(int, double%5C%5C)%22%7D, notUsable=%7B%22// Method recur:%5C%5C(ID%5C%5C)V%22%7D, malus=2, exID=%22GA4.6a%22)  // shall not succeed%0A   %7D%0A)%0A
 @Exercis

Add usage restrictions to ExampleTestcase.