001/* 002 * The contents of this file are subject to the license and copyright 003 * detailed in the LICENSE and NOTICE files at the root of the source 004 * tree. 005 */ 006package org.fcrepo.http.commons.exceptionhandlers; 007 008import static javax.ws.rs.core.Response.Status.FORBIDDEN; 009import static org.junit.Assert.assertEquals; 010 011import java.security.AccessControlException; 012 013import javax.ws.rs.core.Response; 014 015import org.junit.Before; 016import org.junit.Test; 017 018/** 019 * <p>AccessControlJavaSecurityExceptionMapperTest class.</p> 020 * 021 * @author lsitu 022 * @author awoods 023 */ 024public class AccessControlJavaSecurityExceptionMapperTest { 025 026 private AccessControlJavaSecurityExceptionMapper testObj; 027 028 @Before 029 public void setUp() { 030 testObj = new AccessControlJavaSecurityExceptionMapper(); 031 } 032 033 @Test 034 public void testToResponse() { 035 final AccessControlException input = new AccessControlException(""); 036 final Response actual = testObj.toResponse(input); 037 assertEquals(FORBIDDEN.getStatusCode(), actual.getStatus()); 038 } 039}