Buggy code:
public class PagedTableNavigatorTest extends TestCase { public PagedTableNavigatorTest ( ) { } public PagedTableNavigatorTest ( String name ) { } public void testPagedTable ( ) throws Exception { MockHttpApplication application = new MockHttpApplication ( null ) ; <START_BUG> application . getSettings ( ) . setHomePage ( PagedTableNavigatorPage . class ) ; <END_BUG> application . setupRequestAndResponse ( ) ; application . processRequestCycle ( ) ; PagedTableNavigatorPage page = ( ( PagedTableNavigatorPage ) ( application . getLastRenderedPage ( ) ) ) ; String document = application . getServletResponse ( ) . getDocument ( ) ; assertTrue ( validatePage ( document , "PagedTableNavigatorExpectedResult_1.html" ) ) ; Link link = ( ( Link ) ( page . get ( "navigator.first" ) ) ) ; assertFalse ( link . isEnabled ( ) ) ; link = ( ( Link ) ( page . get ( "navigator.prev" ) ) ) ; assertFalse ( link . isEnabled ( ) ) ; link = ( ( Link ) ( page . get ( "navigator.next" ) ) ) ; assertTrue ( link . isEnabled ( ) ) ; link = ( ( Link ) ( page . get ( "navigator.last" ) ) ) ; assertTrue ( link . isEnabled ( ) ) ; link = ( ( Link ) ( page . get ( "navigator.next" ) ) ) ; application . setupRequestAndResponse ( ) ; application . getServletRequest ( ) . setRequestToComponent ( link ) ; application . processRequestCycle ( ) ; document = application . getServletResponse ( ) . getDocument ( ) ; assertTrue ( validatePage ( document , "PagedTableNavigatorExpectedResult_2.html" ) ) ; link = ( ( Link ) ( page . get ( "navigator.first" ) ) ) ; assertTrue ( link . isEnabled ( ) ) ; link = ( ( Link ) ( page . get ( "navigator.prev" ) ) ) ; assertTrue ( link . isEnabled ( ) ) ; link = ( ( Link ) ( page . get ( "navigator.next" ) ) ) ; assertTrue ( link . isEnabled ( ) ) ; link = ( ( Link ) ( page . get ( "navigator.last" ) ) ) ; assertTrue ( link . isEnabled ( ) ) ; link = ( ( Link ) ( page . get ( "navigator.prev" ) ) ) ; application . setupRequestAndResponse ( ) ; application . getServletRequest ( ) . setRequestToComponent ( link ) ; application . processRequestCycle ( ) ; document = application . getServletResponse ( ) . getDocument ( ) ; assertTrue ( validatePage ( document , "PagedTableNavigatorExpectedResult_3.html" ) ) ; link = ( ( Link ) ( page . get ( "navigator.first" ) ) ) ; assertFalse ( link . isEnabled ( ) ) ; link = ( ( Link ) ( page . get ( "navigator.prev" ) ) ) ; assertFalse ( link . isEnabled ( ) ) ; link = ( ( Link ) ( page . get ( "navigator.next" ) ) ) ; assertTrue ( link . isEnabled ( ) ) ; link = ( ( Link ) ( page . get ( "navigator.last" ) ) ) ; assertTrue ( link . isEnabled ( ) ) ; link = ( ( Link ) ( page . get ( "navigator.last" ) ) ) ; application . setupRequestAndResponse ( ) ; application . getServletRequest ( ) . setRequestToComponent ( link ) ; application . processRequestCycle ( ) ; document = application . getServletResponse ( ) . getDocument ( ) ; assertTrue ( validatePage ( document , "PagedTableNavigatorExpectedResult_4.html" ) ) ; link = ( ( Link ) ( page . get ( "navigator.first" ) ) ) ; assertTrue ( link . isEnabled ( ) ) ; link = ( ( Link ) ( page . get ( "navigator.prev" ) ) ) ; assertTrue ( link . isEnabled ( ) ) ; link = ( ( Link ) ( page . get ( "navigator.next" ) ) ) ; assertFalse ( link . isEnabled ( ) ) ; link = ( ( Link ) ( page . get ( "navigator.last" ) ) ) ; assertFalse ( link . isEnabled ( ) ) ; link = ( ( Link ) ( page . get ( "navigator.first" ) ) ) ; application . setupRequestAndResponse ( ) ; application . getServletRequest ( ) . setRequestToComponent ( link ) ; application . processRequestCycle ( ) ; document = application . getServletResponse ( ) . getDocument ( ) ; assertTrue ( validatePage ( document , "PagedTableNavigatorExpectedResult_5.html" ) ) ; link = ( ( Link ) ( page . get ( "navigator.first" ) ) ) ; assertFalse ( link . isEnabled ( ) ) ; link = ( ( Link ) ( page . get ( "navigator.prev" ) ) ) ; assertFalse ( link . isEnabled ( ) ) ; link = ( ( Link ) ( page . get ( "navigator.next" ) ) ) ; assertTrue ( link . isEnabled ( ) ) ; link = ( ( Link ) ( page . get ( "navigator.last" ) ) ) ; assertTrue ( link . isEnabled ( ) ) ; link = ( ( Link ) ( page . get ( "navigator.navigation.2.pageLink" ) ) ) ; application . setupRequestAndResponse ( ) ; application . getServletRequest ( ) . setRequestToComponent ( link ) ; application . processRequestCycle ( ) ; document = application . getServletResponse ( ) . getDocument ( ) ; assertTrue ( validatePage ( document , "PagedTableNavigatorExpectedResult_6.html" ) ) ; link = ( ( Link ) ( page . get ( "navigator.first" ) ) ) ; assertTrue ( link . isEnabled ( ) ) ; link = ( ( Link ) ( page . get ( "navigator.prev" ) ) ) ; assertTrue ( link . isEnabled ( ) ) ; link = ( ( Link ) ( page . get ( "navigator.next" ) ) ) ; assertTrue ( link . isEnabled ( ) ) ; link = ( ( Link ) ( page . get ( "navigator.last" ) ) ) ;

Fix:
application . getPages ( ) . setHomePage ( PagedTableNavigatorPage . class ) ;