### Question:
ITextUtil { public static Rectangle getDefaultPageSize() { String defaultCountry = Locale.getDefault().getCountry(); if ( defaultCountry != null && ( defaultCountry.equals( Locale.US.getCountry() ) || defaultCountry.equals( Locale.CANADA.getCountry() ) ) ) { return PageSize.LETTER; } return PageSize.A4; }  static Rectangle getDefaultPageSize(); static String getPageSize( Rectangle rect ); static boolean isPageSizeSupported( String aPageSize ); static void writePdf( InputStream is, OutputStream os ); static void writeRtf( InputStream is, OutputStream os ); static void writeHtml( InputStream is, OutputStream os );  }### Answer:
@Test public void testGetDefaultPageSize() { Locale oldLocale = Locale.getDefault(); try { Locale.setDefault( Locale.US ); assertEquals( PageSize.LETTER, ITextUtil.getDefaultPageSize() ); Locale.setDefault( Locale.CANADA ); assertEquals( PageSize.LETTER, ITextUtil.getDefaultPageSize() ); Locale.setDefault( Locale.FRANCE ); assertEquals( PageSize.A4, ITextUtil.getDefaultPageSize() ); } finally { Locale.setDefault( oldLocale ); } }