// Path: honeybadger-java/src/test/java/io/honeybadger/reporter/UnitTestExpectedException.java
// public class UnitTestExpectedException extends RuntimeException {
//     private static final long serialVersionUID = -4503310108779513186L;
// 
//     public UnitTestExpectedException() {
//     }
// 
//     public UnitTestExpectedException(String message) {
//         super(message);
//     }
// 
//     public UnitTestExpectedException(String message, Throwable cause) {
//         super(message, cause);
//     }
// 
//     public UnitTestExpectedException(Throwable cause) {
//         super(cause);
//     }
// 
//     public UnitTestExpectedException(String message, Throwable cause,
//                                      boolean enableSuppression,
//                                      boolean writableStackTrace) {
//         super(message, cause, enableSuppression, writableStackTrace);
//     }
// }
// 
// Path: honeybadger-java/src/main/java/io/honeybadger/reporter/config/SpringConfigContext.java
// @Component
// public class SpringConfigContext extends BaseChainedConfigContext {
//     @Autowired
//     public SpringConfigContext(final Environment environment) {
//         super();
// 
//         if (environment != null) {
//             Map<String, String> mapProps = environmentAsMap(environment);
//             MapConfigContext mapConfigContext = new MapConfigContext(mapProps);
// 
//             overwriteWithContext(mapConfigContext);
//         } else {
//             LoggerFactory.getLogger(getClass()).warn(
//                 "Null Spring environment. Using defaults and system settings."
//             );
//             overwriteWithContext(new SystemSettingsConfigContext());
//         }
//     }
// 
//     /**
//      * Spring's {@link Environment} class doesn't provide a way to get all of
//      * the runtime configuration properties as a {@link Map}, so this helper
//      * method iterates through all known keys and queries Spring for values.
//      *
//      * @param environment Spring environment class
//      * @return Map containing all properties found in Spring
//      */
//     protected static Map<String, String> environmentAsMap(
//             final Environment environment) {
//         if (environment == null) {
//             String msg = "Spring environment must not be null";
//             throw new IllegalArgumentException(msg);
//         }
// 
//         final String[] keys = MapConfigContext.ALL_PROPERTIES;
//         final Map<String, String> map = new HashMap<>(keys.length);
// 
//         for (String key : keys) {
//             String value = environment.getProperty(key);
//             if (value == null) continue;
// 
//             map.put(key, value);
//         }
// 
//         return map;
//     }
// }


import static org.junit.Assert.assertThrows;
import static org.mockito.Mockito.mock;
import com.google.common.collect.ImmutableSet;
import io.honeybadger.reporter.UnitTestExpectedException;
import io.honeybadger.reporter.config.SpringConfigContext;
import javax.servlet.http.HttpServletRequest;
import org.junit.Test;
package io.honeybadger.reporter.spring;



/**
 * Tests {@link HoneybadgerSpringExceptionHandler}.
 */
public class HoneybadgerSpringExceptionHandlerTest {
  private final SpringConfigContext context = new SpringConfigContext(null);
  private final HttpServletRequest request = mock(HttpServletRequest.class);

// Path: honeybadger-java/src/test/java/io/honeybadger/reporter/UnitTestExpectedException.java
// public class UnitTestExpectedException extends RuntimeException {
//     private static final long serialVersionUID = -4503310108779513186L;
// 
//     public UnitTestExpectedException() {
//     }
// 
//     public UnitTestExpectedException(String message) {
//         super(message);
//     }
// 
//     public UnitTestExpectedException(String message, Throwable cause) {
//         super(message, cause);
//     }
// 
//     public UnitTestExpectedException(Throwable cause) {
//         super(cause);
//     }
// 
//     public UnitTestExpectedException(String message, Throwable cause,
//                                      boolean enableSuppression,
//                                      boolean writableStackTrace) {
//         super(message, cause, enableSuppression, writableStackTrace);
//     }
// }
// 
// Path: honeybadger-java/src/main/java/io/honeybadger/reporter/config/SpringConfigContext.java
// @Component
// public class SpringConfigContext extends BaseChainedConfigContext {
//     @Autowired
//     public SpringConfigContext(final Environment environment) {
//         super();
// 
//         if (environment != null) {
//             Map<String, String> mapProps = environmentAsMap(environment);
//             MapConfigContext mapConfigContext = new MapConfigContext(mapProps);
// 
//             overwriteWithContext(mapConfigContext);
//         } else {
//             LoggerFactory.getLogger(getClass()).warn(
//                 "Null Spring environment. Using defaults and system settings."
//             );
//             overwriteWithContext(new SystemSettingsConfigContext());
//         }
//     }
// 
//     /**
//      * Spring's {@link Environment} class doesn't provide a way to get all of
//      * the runtime configuration properties as a {@link Map}, so this helper
//      * method iterates through all known keys and queries Spring for values.
//      *
//      * @param environment Spring environment class
//      * @return Map containing all properties found in Spring
//      */
//     protected static Map<String, String> environmentAsMap(
//             final Environment environment) {
//         if (environment == null) {
//             String msg = "Spring environment must not be null";
//             throw new IllegalArgumentException(msg);
//         }
// 
//         final String[] keys = MapConfigContext.ALL_PROPERTIES;
//         final Map<String, String> map = new HashMap<>(keys.length);
// 
//         for (String key : keys) {
//             String value = environment.getProperty(key);
//             if (value == null) continue;
// 
//             map.put(key, value);
//         }
// 
//         return map;
//     }
// }


// Path: honeybadger-java/src/test/java/io/honeybadger/reporter/spring/HoneybadgerSpringExceptionHandlerTest.java
import static org.junit.Assert.assertThrows;
import static org.mockito.Mockito.mock;
import com.google.common.collect.ImmutableSet;
import io.honeybadger.reporter.UnitTestExpectedException;
import io.honeybadger.reporter.config.SpringConfigContext;
import javax.servlet.http.HttpServletRequest;
import org.junit.Test;

package io.honeybadger.reporter.spring;



/**
 * Tests {@link HoneybadgerSpringExceptionHandler}.
 */
public class HoneybadgerSpringExceptionHandlerTest {
  private final SpringConfigContext context = new SpringConfigContext(null);
  private final HttpServletRequest request = mock(HttpServletRequest.class);

  @Test