import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import junit.framework.TestCase;
-
import org.junit.Before;
import org.junit.runner.RunWith;
import org.mockito.Mockito;
import com.mockrunner.mock.web.MockServletInputStream;
+import junit.framework.TestCase;
+
@RunWith(PowerMockRunner.class)
@PrepareForTest(IntegrityMonitor.class) // so PowerMock can mock static method of IntegrityMonitor
public class XACMLPdpServletTest extends TestCase{
pdpServlet.init(servletConfig);
assertTrue(true);
} catch (Exception e) {
- e.printStackTrace();
+ LOGGER.error("Exception Occured"+e);
fail();
}
assertTrue(true);
}catch(Exception e){
System.out.println("Unexpected exception in testDoGetNoTypeError");
- e.printStackTrace();
+ LOGGER.error("Exception Occured"+e);
fail();
}
}
assertTrue(true);
}catch (Exception e){
System.out.println("Unexpected exception in testDoGetConfigType");
- e.printStackTrace();
+ LOGGER.error("Exception Occured"+e);
fail();
}
assertTrue(true);
}catch(Exception e){
System.out.println("Unexpected exception in testDoGetTypeHb");
- e.printStackTrace();
+ LOGGER.error("Exception Occured"+e);
fail();
}
}
assertTrue(true);
}catch(Exception e){
System.out.println("Unexpected exception in testDoGetTypeStatus");
- e.printStackTrace();
+ LOGGER.error("Exception Occured"+e);
fail();
}
}
assertTrue(true);
}catch (Exception e){
System.out.println("Unexpected exception in testDoPost");
- e.printStackTrace();
+ LOGGER.error("Exception Occured"+e);
fail();
}
}
assertTrue(true);
}catch (Exception e){
System.out.println("Unexpected exception in testDoPostToLong");
- e.printStackTrace();
+ LOGGER.error("Exception Occured"+e);
fail();
}
}
assertTrue(true);
}catch (Exception e){
System.out.println("Unexpected exception in testDoPostContentLengthNegative");
- e.printStackTrace();
+ LOGGER.error("Exception Occured"+e);
fail();
}
}
assertTrue(true);
}catch (Exception e){
System.out.println("Unexpected exception in testDoPostContentTypeNonValid");
- e.printStackTrace();
+ LOGGER.error("Exception Occured"+e);
fail();
}
}
assertTrue(true);
}catch (Exception e){
System.out.println("Unexpected exception in testDoPostContentTypeConfigurationError");
- e.printStackTrace();
+ LOGGER.error("Exception Occured"+e);
fail();
}
}
assertTrue(true);
}catch (Exception e){
System.out.println("Unexpected exception in testDoPutCacheEmpty");
- e.printStackTrace();
+ LOGGER.error("Exception Occured"+e);
fail();
}
}
assertTrue(true);
}catch (Exception e){
System.out.println("Unexpected exception in testDoPutConfigPolicies");
- e.printStackTrace();
+ LOGGER.error("Exception Occured"+e);
fail();
}
}
assertTrue(true);
}catch (Exception e){
System.out.println("Unexpected exception in testDoPutToLong");
- e.printStackTrace();
+ LOGGER.error("Exception Occured"+e);
fail();
}
}
assertTrue(true);
}catch (Exception e){
System.out.println("Unexpected exception in testDoPutInvalidContentType");
- e.printStackTrace();
+ LOGGER.error("Exception Occured"+e);
fail();
}
}
pdpServlet.destroy();
}catch(Exception e){
System.out.println("Unexpected exception in testDestroy");
- e.printStackTrace();
+ LOGGER.error("Exception Occured"+e);
fail();
}
}