FileException extends RuntimeException { public String getFileName() { return fileName; } FileException(Exception e);  FileException(Exception e, String fileName);  FileException(String message);  FileException(String message, String fileName);  FileException(String message, Exception e);  FileException(String message, Exception e, String fileName); String getFileName();  }
@Test public void testGetFileName01() throws Exception { FileException fe = new FileException(new String()); String fileName = new String(); ReflectionTestUtils.setField(fe, "fileName", fileName); String result = fe.getFileName(); assertSame(fileName, result); }