### Question:
ErrorLogFactory { public static ErrorLog newInstance(Log.error logError) { return new ErrorLog( AnnotationAttribute.LEVEL.extract(logError), logError.ifEnabled(), logError.verbose(), errorFilterFactory.buildErrorFilter(logError.ofType(), logError.exclude()) ); }  static ErrorLog newInstance(Log.error logError);  }### Answer:
@Test public void newInstance() { Log.error logError = givenLogError(); ErrorLog errorLog = ErrorLogFactory.newInstance(logError); assertThat(errorLog.getLevel(), is(WARN)); assertThat(errorLog.getIfEnabledLevel(), is(WARN)); assertThat(errorLog.getVerboseLevel(), is(TRACE)); assertThat(errorLog.getIncludes(), hasSize(1)); assertThat(errorLog.getIncludes(), Matchers.<Class<?>>contains(RuntimeException.class)); assertThat(errorLog.getExcludes(), hasSize(1)); assertThat(errorLog.getExcludes(), Matchers.<Class<?>>contains(NullPointerException.class)); }
@Test public void newInstanceByValue() { Log.error logError = givenLogErrorByValue(); ErrorLog errorLog = ErrorLogFactory.newInstance(logError); assertThat(errorLog.getLevel(), is(WARN)); }