// Path: src/main/java/net/seninp/util/StackTrace.java
// public final class StackTrace {
// 
//   /** Disable public constructor. */
//   private StackTrace() {
//     // do nothing
//   }
// 
//   /**
//    * Converts the Throwable.getStackTrace to a String representation for logging.
//    * 
//    * @param throwable The Throwable exception.
//    * @return A String containing the StackTrace.
//    */
//   public static String toString(Throwable throwable) {
//     StringWriter stringWriter = new StringWriter();
//     throwable.printStackTrace(new PrintWriter(stringWriter));
//     return stringWriter.toString();
//   }
// }


import static org.junit.Assert.assertTrue;
import org.junit.Test;
import net.seninp.util.StackTrace;
package net.seninp.jmotif.util;


/**
 * Tests the Stack Trace class.
 * 
 * @author Philip Johnson
 */
public class TestStackTrace {

  /**
   * Tests the Stack Tracing. Generates an exception, makes the Stack Trace, and checks to see if it
   * seems OK.
   */
  @Test
  public void testStackTrace() {
    String trace;
    try {
      throw new Exception("Test Exception");
    }
    catch (Exception e) {
// Path: src/main/java/net/seninp/util/StackTrace.java
// public final class StackTrace {
// 
//   /** Disable public constructor. */
//   private StackTrace() {
//     // do nothing
//   }
// 
//   /**
//    * Converts the Throwable.getStackTrace to a String representation for logging.
//    * 
//    * @param throwable The Throwable exception.
//    * @return A String containing the StackTrace.
//    */
//   public static String toString(Throwable throwable) {
//     StringWriter stringWriter = new StringWriter();
//     throwable.printStackTrace(new PrintWriter(stringWriter));
//     return stringWriter.toString();
//   }
// }


// Path: src/test/java/net/seninp/jmotif/util/TestStackTrace.java
import static org.junit.Assert.assertTrue;
import org.junit.Test;
import net.seninp.util.StackTrace;

package net.seninp.jmotif.util;


/**
 * Tests the Stack Trace class.
 * 
 * @author Philip Johnson
 */
public class TestStackTrace {

  /**
   * Tests the Stack Tracing. Generates an exception, makes the Stack Trace, and checks to see if it
   * seems OK.
   */
  @Test
  public void testStackTrace() {
    String trace;
    try {
      throw new Exception("Test Exception");
    }
    catch (Exception e) {
      trace = StackTrace.toString(e);