### Question:
DatabaseLogExceptionFactory { public static ILogExceptionBehaviour getExceptionStrategy( ILogTableCore table ) { return getExceptionStrategy( table, null ); }  static ILogExceptionBehaviour getExceptionStrategy( ILogTableCore table ); static ILogExceptionBehaviour getExceptionStrategy( ILogTableCore table, Exception e ); static final String HOP_GLOBAL_PROP_NAME; }### Answer:
@Test public void testGetExceptionStrategyWithoutException() { ILogExceptionBehaviour exceptionStrategy = DatabaseLogExceptionFactory.getExceptionStrategy( logTable ); String strategyName = exceptionStrategy.getClass().getName(); assertEquals( SUPPRESSABLE, strategyName ); }
@Test public void testGetExceptionStrategyWithoutExceptionPropSetY() { System.setProperty( DatabaseLogExceptionFactory.HOP_GLOBAL_PROP_NAME, PROPERTY_VALUE_TRUE ); ILogExceptionBehaviour exceptionStrategy = DatabaseLogExceptionFactory.getExceptionStrategy( logTable ); String strategyName = exceptionStrategy.getClass().getName(); assertEquals( THROWABLE, strategyName ); }
@Test public void testExceptionStrategyWithException() { ILogExceptionBehaviour exceptionStrategy = DatabaseLogExceptionFactory.getExceptionStrategy( logTable, new Exception() ); String strategyName = exceptionStrategy.getClass().getName(); assertEquals( SUPPRESSABLE, strategyName ); }
@Test public void testGetExceptionStrategyWithExceptionPropSetY() { System.setProperty( DatabaseLogExceptionFactory.HOP_GLOBAL_PROP_NAME, PROPERTY_VALUE_TRUE ); ILogExceptionBehaviour exceptionStrategy = DatabaseLogExceptionFactory.getExceptionStrategy( logTable, new Exception() ); String strategyName = exceptionStrategy.getClass().getName(); assertEquals( THROWABLE, strategyName ); }