Identifier required when invoking a private method
<p>I am calling a private method for testing and for that I am using the following code to invoke private method. repeat() is the private method of class Diamond</p>

<pre><code>import org.junit.Test;
import static org.junit.Assert.*;
import java.lang.StringBuilder;
import java.lang.reflect.Method;
public class DiamondUnit {
        StringBuilder expect = new StringBuilder();
        Diamond test = new Diamond();
        Method m = test.getClass().getDeclaredMethod("repeat");
        m.setAccessible(true);
        m.invoke(test);

    @Test
        public void testRepeatNeg() {
            assertEquals("", test.repeat(expect,"a",-1));
        }
}
</code></pre>

<p>While compiling it is giving error </p>

<pre><code>DiamondUnit.java:11: error: expected
m.setAccessible(true);
^
DiamondUnit.java:11: error: illegal start of type
m.setAccessible(true);
^
DiamondUnit.java:12: error: expected
m.invoke(test);
^
DiamondUnit.java:12: error: expected
m.invoke(test);
^
</code></pre>

<p>I had cop pasted the exact error message which I am getting</p>
