public class MalformedBundlerRequestExceptionTest {
@Test
public void testCreatingExceptionWithAllArgsProvided() throws Exception {
try {
MalformedRequestException ex = new MalformedRequestException("foo.bundle", "oops, there was a problem");
ex.setCharacterNumber(4);
throw ex;
} catch (MalformedRequestException ex) {
String[] exceptionLines = ex.toString().split("\n");
assertEquals( "MalformedBundlerRequestException when processing the request 'foo.bundle'.", exceptionLines[0] );
assertEquals( "Invalid character at position 4: foo.bundle", exceptionLines[1] );
assertEquals( " ^", exceptionLines[2] );
assertEquals( "oops, there was a problem", exceptionLines[3] );
assertEquals( "The stack trace for the exception is below.", exceptionLines[4] );