11/*
2- * Copyright 2002-2009 the original author or authors.
2+ * Copyright 2002-2011 the original author or authors.
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
1616
1717package org .springframework .web .servlet .view ;
1818
19- import static org .junit .Assert .assertEquals ;
20- import static org .junit .Assert .assertNull ;
21- import static org .junit .Assert .assertSame ;
22- import static org .junit .Assert .assertTrue ;
23- import static org .junit .Assert .fail ;
24-
2519import java .util .HashMap ;
2620import java .util .Locale ;
2721import java .util .Map ;
2822import java .util .Properties ;
2923import java .util .concurrent .atomic .AtomicInteger ;
30-
3124import javax .servlet .RequestDispatcher ;
3225import javax .servlet .ServletContext ;
3326import javax .servlet .ServletException ;
3932import javax .servlet .jsp .jstl .fmt .LocalizationContext ;
4033
4134import org .junit .Test ;
35+
4236import org .springframework .beans .MutablePropertyValues ;
4337import org .springframework .beans .PropertyValue ;
4438import org .springframework .beans .TestBean ;
5953import org .springframework .web .servlet .support .RequestContext ;
6054import org .springframework .web .servlet .theme .FixedThemeResolver ;
6155
56+ import static org .junit .Assert .*;
57+
6258/**
6359 * @author Juergen Hoeller
6460 * @author Chris Beams
@@ -499,7 +495,7 @@ public void testCacheRemoval() throws Exception {
499495 vr .removeFromCache ("example1" , Locale .getDefault ());
500496 cached = vr .resolveViewName ("example1" , Locale .getDefault ());
501497 if (view == cached ) {
502- // the chance of having the same reference (hashCode) twice if negligable ).
498+ // the chance of having the same reference (hashCode) twice if negligible ).
503499 fail ("View wasn't removed from cache" );
504500 }
505501 }
@@ -526,10 +522,14 @@ protected View loadView(String viewName, Locale locale) throws Exception {
526522
527523 viewResolver .resolveViewName ("view" , Locale .getDefault ());
528524 viewResolver .resolveViewName ("view" , Locale .getDefault ());
529-
530- assertEquals (2 , count .intValue ());
525+ viewResolver .resolveViewName ("view" , Locale .getDefault ());
526+ viewResolver .resolveViewName ("view" , Locale .getDefault ());
527+ viewResolver .resolveViewName ("view" , Locale .getDefault ());
528+
529+ assertEquals (3 , count .intValue ());
531530 }
532531
532+
533533 public static class TestView extends InternalResourceView {
534534
535535 public void setLocation (Resource location ) {
0 commit comments