1 package test.privatemethod;
2 
3 import org.testng.Assert;
4 import org.testng.annotations.Test;
5 
6 
7 public class PrivateMethodTest {
PrivateMethodTest(String name, int value)8   public PrivateMethodTest(String name, int value) {
9   }
10 
privateMethod()11   private int privateMethod() {
12     return 1;
13   }
14 
15   public static class PrivateMethodInnerTest {
16     @Test
testPrivateMethod()17     public void testPrivateMethod() {
18       PrivateMethodTest pmt = new PrivateMethodTest("aname", 1);
19       int returnValue = pmt.privateMethod();
20 
21       Assert.assertEquals(returnValue, 1);
22     }
23   }
24 }
25