added some basic unit tests

git-svn-id: https://svn.apache.org/repos/asf/incubator/jsecurity/trunk@710925 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/jsecurity.iml b/jsecurity.iml
index 7653cab..65b5433 100644
--- a/jsecurity.iml
+++ b/jsecurity.iml
@@ -1,55 +1,55 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module relativePaths="true" type="JAVA_MODULE" version="4">
-  <component name="FacetManager">
-    <facet type="Spring" name="Spring">
-      <configuration>
-        <fileset id="fileset1" name="Spring Sample" removed="false">
-          <file>file://$MODULE_DIR$/samples/spring/webroot/WEB-INF/applicationContext.xml</file>
-          <file>file://$MODULE_DIR$/samples/spring/etc/webstart.spring.xml</file>
-          <file>file://$MODULE_DIR$/samples/spring/webroot/WEB-INF/sample-servlet.xml</file>
-          <file>file://$MODULE_DIR$/samples/spring/webroot/WEB-INF/remoting-servlet.xml</file>
-        </fileset>
-        <options>
-          <option name="enableValidation" value="true" />
-          <option name="reportErrorsAsWarnings" value="true" />
-        </options>
-        <customNs />
-      </configuration>
-    </facet>
-  </component>
-  <component name="NewModuleRootManager" inherit-compiler-output="false">
-    <output url="file://$MODULE_DIR$/build/classes" />
-    <exclude-output />
-    <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/samples/spring-hibernate/WEB-INF/classes" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/samples/spring-hibernate/src" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/samples/spring/etc" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/samples/spring/src" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/support/spring/src" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
-      <excludeFolder url="file://$MODULE_DIR$/build" />
-    </content>
-    <orderEntry type="inheritedJdk" />
-    <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="library" name="j2ee" level="project" />
-    <orderEntry type="library" name="ehcache" level="project" />
-    <orderEntry type="library" name="jakarta-commons" level="project" />
-    <orderEntry type="library" name="jakarta-taglibs" level="project" />
-    <orderEntry type="library" name="jarjar" level="project" />
-    <orderEntry type="library" name="jboss-aop" level="project" />
-    <orderEntry type="library" name="log4j" level="project" />
-    <orderEntry type="library" name="quartz" level="project" />
-    <orderEntry type="library" name="spring" level="project" />
-    <orderEntry type="library" name="easymock" level="project" />
-    <orderEntry type="library" name="junit" level="project" />
-    <orderEntry type="library" name="clover" level="project" />
-    <orderEntry type="library" name="retroweaver" level="project" />
-    <orderEntry type="library" name="jug" level="project" />
-    <orderEntry type="library" name="atunit" level="project" />
-    <orderEntry type="library" name="google-collections" level="project" />
-    <orderEntry type="library" name="all-libs" level="project" />
-    <orderEntryProperties />
-  </component>
-</module>
-
+<?xml version="1.0" encoding="UTF-8"?>

+<module relativePaths="true" type="JAVA_MODULE" version="4">

+  <component name="FacetManager">

+    <facet type="Spring" name="Spring">

+      <configuration>

+        <fileset id="fileset1" name="Spring Sample" removed="false">

+          <file>file://$MODULE_DIR$/samples/spring/webroot/WEB-INF/applicationContext.xml</file>

+          <file>file://$MODULE_DIR$/samples/spring/etc/webstart.spring.xml</file>

+          <file>file://$MODULE_DIR$/samples/spring/webroot/WEB-INF/sample-servlet.xml</file>

+          <file>file://$MODULE_DIR$/samples/spring/webroot/WEB-INF/remoting-servlet.xml</file>

+        </fileset>

+        <options>

+          <option name="enableValidation" value="true" />

+          <option name="reportErrorsAsWarnings" value="true" />

+        </options>

+        <customNs />

+      </configuration>

+    </facet>

+  </component>

+  <component name="NewModuleRootManager" inherit-compiler-output="false">

+    <output url="file://$MODULE_DIR$/build/classes" />

+    <exclude-output />

+    <content url="file://$MODULE_DIR$">

+      <sourceFolder url="file://$MODULE_DIR$/samples/spring-hibernate/WEB-INF/classes" isTestSource="false" />

+      <sourceFolder url="file://$MODULE_DIR$/samples/spring-hibernate/src" isTestSource="false" />

+      <sourceFolder url="file://$MODULE_DIR$/samples/spring/etc" isTestSource="false" />

+      <sourceFolder url="file://$MODULE_DIR$/samples/spring/src" isTestSource="false" />

+      <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />

+      <sourceFolder url="file://$MODULE_DIR$/support/spring/src" isTestSource="false" />

+      <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />

+      <excludeFolder url="file://$MODULE_DIR$/build" />

+    </content>

+    <orderEntry type="inheritedJdk" />

+    <orderEntry type="sourceFolder" forTests="false" />

+    <orderEntry type="library" name="j2ee" level="project" />

+    <orderEntry type="library" name="ehcache" level="project" />

+    <orderEntry type="library" name="jakarta-commons" level="project" />

+    <orderEntry type="library" name="jakarta-taglibs" level="project" />

+    <orderEntry type="library" name="jarjar" level="project" />

+    <orderEntry type="library" name="jboss-aop" level="project" />

+    <orderEntry type="library" name="log4j" level="project" />

+    <orderEntry type="library" name="quartz" level="project" />

+    <orderEntry type="library" name="spring" level="project" />

+    <orderEntry type="library" name="easymock" level="project" />

+    <orderEntry type="library" name="junit" level="project" />

+    <orderEntry type="library" name="clover" level="project" />

+    <orderEntry type="library" name="retroweaver" level="project" />

+    <orderEntry type="library" name="jug" level="project" />

+    <orderEntry type="library" name="atunit" level="project" />

+    <orderEntry type="library" name="google-collections" level="project" />

+    <orderEntry type="library" name="all-libs" level="project" />

+    <orderEntryProperties />

+  </component>

+</module>

+

diff --git a/jsecurity.ipr b/jsecurity.ipr
index b3567b7..e9e8793 100644
--- a/jsecurity.ipr
+++ b/jsecurity.ipr
@@ -1,349 +1,349 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project relativePaths="false" version="4">
-  <component name="AntConfiguration">
-    <defaultAnt bundledAnt="true" />
-    <buildFile url="file://$PROJECT_DIR$/build.xml">
-      <additionalClassPath />
-      <antReference projectDefault="true" />
-      <customJdkName value="" />
-      <maximumHeapSize value="128" />
-      <properties />
-    </buildFile>
-    <buildFile url="file://$PROJECT_DIR$/samples/spring/build.xml">
-      <additionalClassPath />
-      <antReference projectDefault="true" />
-      <customJdkName value="" />
-      <maximumHeapSize value="128" />
-      <properties />
-    </buildFile>
-  </component>
-  <component name="BuildJarProjectSettings">
-    <option name="BUILD_JARS_ON_MAKE" value="false" />
-  </component>
-  <component name="CodeStyleProjectProfileManger">
-    <option name="PROJECT_PROFILE" />
-    <option name="USE_PROJECT_LEVEL_SETTINGS" value="false" />
-  </component>
-  <component name="CodeStyleSettingsManager">
-    <option name="PER_PROJECT_SETTINGS" />
-    <option name="USE_PER_PROJECT_SETTINGS" value="false" />
-  </component>
-  <component name="CompilerConfiguration">
-    <option name="DEFAULT_COMPILER" value="Javac" />
-    <option name="DEPLOY_AFTER_MAKE" value="0" />
-    <resourceExtensions>
-      <entry name=".+\.(properties|xml|html|dtd|tld)" />
-      <entry name=".+\.(gif|png|jpeg|jpg)" />
-    </resourceExtensions>
-    <wildcardResourcePatterns>
-      <entry name="?*.properties" />
-      <entry name="?*.xml" />
-      <entry name="?*.gif" />
-      <entry name="?*.png" />
-      <entry name="?*.jpeg" />
-      <entry name="?*.jpg" />
-      <entry name="?*.html" />
-      <entry name="?*.dtd" />
-      <entry name="?*.tld" />
-    </wildcardResourcePatterns>
-  </component>
-  <component name="DependenciesAnalyzeManager">
-    <option name="myForwardDirection" value="false" />
-  </component>
-  <component name="DependencyValidationManager">
-    <option name="SKIP_IMPORT_STATEMENTS" value="false" />
-  </component>
-  <component name="EclipseCompilerSettings">
-    <option name="DEBUGGING_INFO" value="true" />
-    <option name="GENERATE_NO_WARNINGS" value="true" />
-    <option name="DEPRECATION" value="false" />
-    <option name="ADDITIONAL_OPTIONS_STRING" value="" />
-    <option name="MAXIMUM_HEAP_SIZE" value="128" />
-  </component>
-  <component name="EclipseEmbeddedCompilerSettings">
-    <option name="DEBUGGING_INFO" value="true" />
-    <option name="GENERATE_NO_WARNINGS" value="true" />
-    <option name="DEPRECATION" value="false" />
-    <option name="ADDITIONAL_OPTIONS_STRING" value="" />
-    <option name="MAXIMUM_HEAP_SIZE" value="128" />
-  </component>
-  <component name="EntryPointsManager">
-    <entry_points version="2.0" />
-  </component>
-  <component name="ExportToHTMLSettings">
-    <option name="PRINT_LINE_NUMBERS" value="false" />
-    <option name="OPEN_IN_BROWSER" value="false" />
-    <option name="OUTPUT_DIRECTORY" />
-  </component>
-  <component name="FacetAutodetectingManager">
-    <autodetection-disabled>
-      <facet-type id="web">
-        <modules>
-          <module name="jsecurity" />
-        </modules>
-      </facet-type>
-    </autodetection-disabled>
-  </component>
-  <component name="IdProvider" IDEtalkID="AA26C3B0305A759EFA1939838DE6155E" />
-  <component name="InspectionProjectProfileManager">
-    <option name="PROJECT_PROFILE" value="Project Default" />
-    <option name="USE_PROJECT_LEVEL_SETTINGS" value="false" />
-    <scopes />
-    <profiles>
-      <profile version="1.0" is_locked="false">
-        <option name="myName" value="Project Default" />
-        <option name="myLocal" value="false" />
-      </profile>
-    </profiles>
-    <list size="0" />
-  </component>
-  <component name="JavacSettings">
-    <option name="DEBUGGING_INFO" value="true" />
-    <option name="GENERATE_NO_WARNINGS" value="false" />
-    <option name="DEPRECATION" value="true" />
-    <option name="ADDITIONAL_OPTIONS_STRING" value="" />
-    <option name="MAXIMUM_HEAP_SIZE" value="128" />
-  </component>
-  <component name="JavadocGenerationManager">
-    <option name="OUTPUT_DIRECTORY" />
-    <option name="OPTION_SCOPE" value="protected" />
-    <option name="OPTION_HIERARCHY" value="true" />
-    <option name="OPTION_NAVIGATOR" value="true" />
-    <option name="OPTION_INDEX" value="true" />
-    <option name="OPTION_SEPARATE_INDEX" value="true" />
-    <option name="OPTION_DOCUMENT_TAG_USE" value="false" />
-    <option name="OPTION_DOCUMENT_TAG_AUTHOR" value="false" />
-    <option name="OPTION_DOCUMENT_TAG_VERSION" value="false" />
-    <option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="true" />
-    <option name="OPTION_DEPRECATED_LIST" value="true" />
-    <option name="OTHER_OPTIONS" value="" />
-    <option name="HEAP_SIZE" />
-    <option name="LOCALE" />
-    <option name="OPEN_IN_BROWSER" value="true" />
-  </component>
-  <component name="JikesSettings">
-    <option name="JIKES_PATH" value="" />
-    <option name="DEBUGGING_INFO" value="true" />
-    <option name="DEPRECATION" value="true" />
-    <option name="GENERATE_NO_WARNINGS" value="false" />
-    <option name="IS_EMACS_ERRORS_MODE" value="true" />
-    <option name="ADDITIONAL_OPTIONS_STRING" value="" />
-  </component>
-  <component name="LogConsolePreferences">
-    <option name="FILTER_ERRORS" value="false" />
-    <option name="FILTER_WARNINGS" value="false" />
-    <option name="FILTER_INFO" value="true" />
-    <option name="CUSTOM_FILTER" />
-  </component>
-  <component name="MavenBuildProjectComponent">
-    <option name="mavenExecutable" value="" />
-    <option name="Settings File" value="" />
-    <option name="mavenCommandLineParams" value="" />
-    <option name="vmOptions" value="" />
-    <option name="useMavenEmbedder" value="false" />
-    <option name="useFilter" value="false" />
-    <option name="Batch Mode" value="false" />
-    <option name="Check Plugin Updates" value="false" />
-    <option name="Debug" value="false" />
-    <option name="Errors" value="false" />
-    <option name="Fail At End" value="false" />
-    <option name="Fail Fast" value="false" />
-    <option name="Fail Never" value="false" />
-    <option name="Lax Checksums" value="false" />
-    <option name="No Plugin Registry" value="false" />
-    <option name="No Plugin Updates" value="false" />
-    <option name="Non Recursive" value="false" />
-    <option name="Offline" value="false" />
-    <option name="Reactor" value="false" />
-    <option name="Strict Checksums" value="false" />
-    <option name="Update Plugins" value="false" />
-    <option name="Update Snapshots" value="false" />
-    <option name="Skip Tests" value="false" />
-    <pom-list />
-  </component>
-  <component name="Palette2">
-    <group name="Swing">
-      <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
-        <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
-      </item>
-      <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
-        <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
-      </item>
-      <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
-        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
-      </item>
-      <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
-        <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
-      </item>
-      <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
-        <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
-        <initial-values>
-          <property name="text" value="Button" />
-        </initial-values>
-      </item>
-      <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
-        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
-        <initial-values>
-          <property name="text" value="RadioButton" />
-        </initial-values>
-      </item>
-      <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
-        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
-        <initial-values>
-          <property name="text" value="CheckBox" />
-        </initial-values>
-      </item>
-      <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
-        <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
-        <initial-values>
-          <property name="text" value="Label" />
-        </initial-values>
-      </item>
-      <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
-        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
-          <preferred-size width="150" height="-1" />
-        </default-constraints>
-      </item>
-      <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
-        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
-          <preferred-size width="150" height="-1" />
-        </default-constraints>
-      </item>
-      <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
-        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
-          <preferred-size width="150" height="-1" />
-        </default-constraints>
-      </item>
-      <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
-        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
-          <preferred-size width="150" height="50" />
-        </default-constraints>
-      </item>
-      <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
-        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
-          <preferred-size width="150" height="50" />
-        </default-constraints>
-      </item>
-      <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
-        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
-          <preferred-size width="150" height="50" />
-        </default-constraints>
-      </item>
-      <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
-        <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
-      </item>
-      <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
-        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
-          <preferred-size width="150" height="50" />
-        </default-constraints>
-      </item>
-      <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
-        <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
-          <preferred-size width="150" height="50" />
-        </default-constraints>
-      </item>
-      <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
-        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
-          <preferred-size width="150" height="50" />
-        </default-constraints>
-      </item>
-      <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
-        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
-          <preferred-size width="200" height="200" />
-        </default-constraints>
-      </item>
-      <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
-        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
-          <preferred-size width="200" height="200" />
-        </default-constraints>
-      </item>
-      <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
-        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
-      </item>
-      <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
-        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
-      </item>
-      <item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
-        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
-      </item>
-      <item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
-        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
-      </item>
-      <item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
-        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
-          <preferred-size width="-1" height="20" />
-        </default-constraints>
-      </item>
-      <item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
-        <default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
-      </item>
-      <item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
-        <default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
-      </item>
-    </group>
-  </component>
-  <component name="ProjectFileVersion" converted="true" />
-  <component name="ProjectModuleManager">
-    <modules>
-      <module fileurl="file://$PROJECT_DIR$/jsecurity.iml" filepath="$PROJECT_DIR$/jsecurity.iml" />
-    </modules>
-  </component>
-  <component name="ProjectRootManager" version="2" assert-keyword="true" jdk-15="true" project-jdk-name="1.5" project-jdk-type="JavaSDK" />
-  <component name="ResourceManagerContainer">
-    <option name="myResourceBundles">
-      <value>
-        <list size="0" />
-      </value>
-    </option>
-  </component>
-  <component name="RmicSettings">
-    <option name="IS_EANABLED" value="false" />
-    <option name="DEBUGGING_INFO" value="true" />
-    <option name="GENERATE_NO_WARNINGS" value="false" />
-    <option name="GENERATE_IIOP_STUBS" value="false" />
-    <option name="ADDITIONAL_OPTIONS_STRING" value="" />
-  </component>
-  <component name="SvnBranchConfigurationManager">
-    <option name="myConfigurationMap">
-      <map>
-        <entry key="$PROJECT_DIR$">
-          <value>
-            <SvnBranchConfiguration>
-              <option name="branchUrls">
-                <list>
-                  <option value="https://jsecurity.svn.sourceforge.net/svnroot/jsecurity/branches" />
-                  <option value="https://jsecurity.svn.sourceforge.net/svnroot/jsecurity/tags" />
-                </list>
-              </option>
-              <option name="trunkUrl" value="https://jsecurity.svn.sourceforge.net/svnroot/jsecurity/trunk" />
-            </SvnBranchConfiguration>
-          </value>
-        </entry>
-      </map>
-    </option>
-  </component>
-  <component name="VcsDirectoryMappings">
-    <mapping directory="" vcs="svn" />
-  </component>
-  <component name="WebServicesPlugin" addRequiredLibraries="true" />
-  <component name="com.intellij.jsf.UserDefinedFacesConfigs">
-    <option name="USER_DEFINED_CONFIGS">
-      <value>
-        <list size="0" />
-      </value>
-    </option>
-  </component>
-  <component name="libraryTable">
-    <library name="all-libs">
-      <CLASSES>
-        <root url="file://$PROJECT_DIR$/lib/test" />
-      </CLASSES>
-      <JAVADOC />
-      <SOURCES>
-        <root url="jar:///usr/local/java/tools/spring/spring-framework-2.5.2/dist/spring-sources.jar!/" />
-      </SOURCES>
-      <jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="false" />
-    </library>
-  </component>
-</project>
-
+<?xml version="1.0" encoding="UTF-8"?>

+<project relativePaths="false" version="4">

+  <component name="AntConfiguration">

+    <defaultAnt bundledAnt="true" />

+    <buildFile url="file://$PROJECT_DIR$/build.xml">

+      <additionalClassPath />

+      <antReference projectDefault="true" />

+      <customJdkName value="" />

+      <maximumHeapSize value="128" />

+      <properties />

+    </buildFile>

+    <buildFile url="file://$PROJECT_DIR$/samples/spring/build.xml">

+      <additionalClassPath />

+      <antReference projectDefault="true" />

+      <customJdkName value="" />

+      <maximumHeapSize value="128" />

+      <properties />

+    </buildFile>

+  </component>

+  <component name="BuildJarProjectSettings">

+    <option name="BUILD_JARS_ON_MAKE" value="false" />

+  </component>

+  <component name="CodeStyleProjectProfileManger">

+    <option name="PROJECT_PROFILE" />

+    <option name="USE_PROJECT_LEVEL_SETTINGS" value="false" />

+  </component>

+  <component name="CodeStyleSettingsManager">

+    <option name="PER_PROJECT_SETTINGS" />

+    <option name="USE_PER_PROJECT_SETTINGS" value="false" />

+  </component>

+  <component name="CompilerConfiguration">

+    <option name="DEFAULT_COMPILER" value="Javac" />

+    <option name="DEPLOY_AFTER_MAKE" value="0" />

+    <resourceExtensions>

+      <entry name=".+\.(properties|xml|html|dtd|tld)" />

+      <entry name=".+\.(gif|png|jpeg|jpg)" />

+    </resourceExtensions>

+    <wildcardResourcePatterns>

+      <entry name="?*.properties" />

+      <entry name="?*.xml" />

+      <entry name="?*.gif" />

+      <entry name="?*.png" />

+      <entry name="?*.jpeg" />

+      <entry name="?*.jpg" />

+      <entry name="?*.html" />

+      <entry name="?*.dtd" />

+      <entry name="?*.tld" />

+    </wildcardResourcePatterns>

+  </component>

+  <component name="DependenciesAnalyzeManager">

+    <option name="myForwardDirection" value="false" />

+  </component>

+  <component name="DependencyValidationManager">

+    <option name="SKIP_IMPORT_STATEMENTS" value="false" />

+  </component>

+  <component name="EclipseCompilerSettings">

+    <option name="DEBUGGING_INFO" value="true" />

+    <option name="GENERATE_NO_WARNINGS" value="true" />

+    <option name="DEPRECATION" value="false" />

+    <option name="ADDITIONAL_OPTIONS_STRING" value="" />

+    <option name="MAXIMUM_HEAP_SIZE" value="128" />

+  </component>

+  <component name="EclipseEmbeddedCompilerSettings">

+    <option name="DEBUGGING_INFO" value="true" />

+    <option name="GENERATE_NO_WARNINGS" value="true" />

+    <option name="DEPRECATION" value="false" />

+    <option name="ADDITIONAL_OPTIONS_STRING" value="" />

+    <option name="MAXIMUM_HEAP_SIZE" value="128" />

+  </component>

+  <component name="EntryPointsManager">

+    <entry_points version="2.0" />

+  </component>

+  <component name="ExportToHTMLSettings">

+    <option name="PRINT_LINE_NUMBERS" value="false" />

+    <option name="OPEN_IN_BROWSER" value="false" />

+    <option name="OUTPUT_DIRECTORY" />

+  </component>

+  <component name="FacetAutodetectingManager">

+    <autodetection-disabled>

+      <facet-type id="web">

+        <modules>

+          <module name="jsecurity" />

+        </modules>

+      </facet-type>

+    </autodetection-disabled>

+  </component>

+  <component name="IdProvider" IDEtalkID="AA26C3B0305A759EFA1939838DE6155E" />

+  <component name="InspectionProjectProfileManager">

+    <option name="PROJECT_PROFILE" value="Project Default" />

+    <option name="USE_PROJECT_LEVEL_SETTINGS" value="false" />

+    <scopes />

+    <profiles>

+      <profile version="1.0" is_locked="false">

+        <option name="myName" value="Project Default" />

+        <option name="myLocal" value="false" />

+      </profile>

+    </profiles>

+    <list size="0" />

+  </component>

+  <component name="JavacSettings">

+    <option name="DEBUGGING_INFO" value="true" />

+    <option name="GENERATE_NO_WARNINGS" value="false" />

+    <option name="DEPRECATION" value="true" />

+    <option name="ADDITIONAL_OPTIONS_STRING" value="" />

+    <option name="MAXIMUM_HEAP_SIZE" value="128" />

+  </component>

+  <component name="JavadocGenerationManager">

+    <option name="OUTPUT_DIRECTORY" />

+    <option name="OPTION_SCOPE" value="protected" />

+    <option name="OPTION_HIERARCHY" value="true" />

+    <option name="OPTION_NAVIGATOR" value="true" />

+    <option name="OPTION_INDEX" value="true" />

+    <option name="OPTION_SEPARATE_INDEX" value="true" />

+    <option name="OPTION_DOCUMENT_TAG_USE" value="false" />

+    <option name="OPTION_DOCUMENT_TAG_AUTHOR" value="false" />

+    <option name="OPTION_DOCUMENT_TAG_VERSION" value="false" />

+    <option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="true" />

+    <option name="OPTION_DEPRECATED_LIST" value="true" />

+    <option name="OTHER_OPTIONS" value="" />

+    <option name="HEAP_SIZE" />

+    <option name="LOCALE" />

+    <option name="OPEN_IN_BROWSER" value="true" />

+  </component>

+  <component name="JikesSettings">

+    <option name="JIKES_PATH" value="" />

+    <option name="DEBUGGING_INFO" value="true" />

+    <option name="DEPRECATION" value="true" />

+    <option name="GENERATE_NO_WARNINGS" value="false" />

+    <option name="IS_EMACS_ERRORS_MODE" value="true" />

+    <option name="ADDITIONAL_OPTIONS_STRING" value="" />

+  </component>

+  <component name="LogConsolePreferences">

+    <option name="FILTER_ERRORS" value="false" />

+    <option name="FILTER_WARNINGS" value="false" />

+    <option name="FILTER_INFO" value="true" />

+    <option name="CUSTOM_FILTER" />

+  </component>

+  <component name="MavenBuildProjectComponent">

+    <option name="mavenExecutable" value="" />

+    <option name="Settings File" value="" />

+    <option name="mavenCommandLineParams" value="" />

+    <option name="vmOptions" value="" />

+    <option name="useMavenEmbedder" value="false" />

+    <option name="useFilter" value="false" />

+    <option name="Batch Mode" value="false" />

+    <option name="Check Plugin Updates" value="false" />

+    <option name="Debug" value="false" />

+    <option name="Errors" value="false" />

+    <option name="Fail At End" value="false" />

+    <option name="Fail Fast" value="false" />

+    <option name="Fail Never" value="false" />

+    <option name="Lax Checksums" value="false" />

+    <option name="No Plugin Registry" value="false" />

+    <option name="No Plugin Updates" value="false" />

+    <option name="Non Recursive" value="false" />

+    <option name="Offline" value="false" />

+    <option name="Reactor" value="false" />

+    <option name="Strict Checksums" value="false" />

+    <option name="Update Plugins" value="false" />

+    <option name="Update Snapshots" value="false" />

+    <option name="Skip Tests" value="false" />

+    <pom-list />

+  </component>

+  <component name="Palette2">

+    <group name="Swing">

+      <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">

+        <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />

+      </item>

+      <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">

+        <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />

+      </item>

+      <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">

+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />

+      </item>

+      <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">

+        <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />

+      </item>

+      <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">

+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />

+        <initial-values>

+          <property name="text" value="Button" />

+        </initial-values>

+      </item>

+      <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">

+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />

+        <initial-values>

+          <property name="text" value="RadioButton" />

+        </initial-values>

+      </item>

+      <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">

+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />

+        <initial-values>

+          <property name="text" value="CheckBox" />

+        </initial-values>

+      </item>

+      <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">

+        <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />

+        <initial-values>

+          <property name="text" value="Label" />

+        </initial-values>

+      </item>

+      <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">

+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">

+          <preferred-size width="150" height="-1" />

+        </default-constraints>

+      </item>

+      <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">

+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">

+          <preferred-size width="150" height="-1" />

+        </default-constraints>

+      </item>

+      <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">

+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">

+          <preferred-size width="150" height="-1" />

+        </default-constraints>

+      </item>

+      <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">

+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">

+          <preferred-size width="150" height="50" />

+        </default-constraints>

+      </item>

+      <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">

+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">

+          <preferred-size width="150" height="50" />

+        </default-constraints>

+      </item>

+      <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">

+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">

+          <preferred-size width="150" height="50" />

+        </default-constraints>

+      </item>

+      <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">

+        <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />

+      </item>

+      <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">

+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">

+          <preferred-size width="150" height="50" />

+        </default-constraints>

+      </item>

+      <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">

+        <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">

+          <preferred-size width="150" height="50" />

+        </default-constraints>

+      </item>

+      <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">

+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">

+          <preferred-size width="150" height="50" />

+        </default-constraints>

+      </item>

+      <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">

+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">

+          <preferred-size width="200" height="200" />

+        </default-constraints>

+      </item>

+      <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">

+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">

+          <preferred-size width="200" height="200" />

+        </default-constraints>

+      </item>

+      <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">

+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />

+      </item>

+      <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">

+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />

+      </item>

+      <item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">

+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />

+      </item>

+      <item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">

+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />

+      </item>

+      <item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">

+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">

+          <preferred-size width="-1" height="20" />

+        </default-constraints>

+      </item>

+      <item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">

+        <default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />

+      </item>

+      <item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">

+        <default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />

+      </item>

+    </group>

+  </component>

+  <component name="ProjectFileVersion" converted="true" />

+  <component name="ProjectModuleManager">

+    <modules>

+      <module fileurl="file://$PROJECT_DIR$/jsecurity.iml" filepath="$PROJECT_DIR$/jsecurity.iml" />

+    </modules>

+  </component>

+  <component name="ProjectRootManager" version="2" assert-keyword="true" jdk-15="true" project-jdk-name="1.5" project-jdk-type="JavaSDK" />

+  <component name="ResourceManagerContainer">

+    <option name="myResourceBundles">

+      <value>

+        <list size="0" />

+      </value>

+    </option>

+  </component>

+  <component name="RmicSettings">

+    <option name="IS_EANABLED" value="false" />

+    <option name="DEBUGGING_INFO" value="true" />

+    <option name="GENERATE_NO_WARNINGS" value="false" />

+    <option name="GENERATE_IIOP_STUBS" value="false" />

+    <option name="ADDITIONAL_OPTIONS_STRING" value="" />

+  </component>

+  <component name="SvnBranchConfigurationManager">

+    <option name="myConfigurationMap">

+      <map>

+        <entry key="$PROJECT_DIR$">

+          <value>

+            <SvnBranchConfiguration>

+              <option name="branchUrls">

+                <list>

+                  <option value="https://jsecurity.svn.sourceforge.net/svnroot/jsecurity/branches" />

+                  <option value="https://jsecurity.svn.sourceforge.net/svnroot/jsecurity/tags" />

+                </list>

+              </option>

+              <option name="trunkUrl" value="https://jsecurity.svn.sourceforge.net/svnroot/jsecurity/trunk" />

+            </SvnBranchConfiguration>

+          </value>

+        </entry>

+      </map>

+    </option>

+  </component>

+  <component name="VcsDirectoryMappings">

+    <mapping directory="" vcs="svn" />

+  </component>

+  <component name="WebServicesPlugin" addRequiredLibraries="true" />

+  <component name="com.intellij.jsf.UserDefinedFacesConfigs">

+    <option name="USER_DEFINED_CONFIGS">

+      <value>

+        <list size="0" />

+      </value>

+    </option>

+  </component>

+  <component name="libraryTable">

+    <library name="all-libs">

+      <CLASSES>

+        <root url="file://$PROJECT_DIR$/lib/test" />

+      </CLASSES>

+      <JAVADOC />

+      <SOURCES>

+        <root url="jar:///usr/local/java/tools/spring/spring-framework-2.5.2/dist/spring-sources.jar!/" />

+      </SOURCES>

+      <jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="false" />

+    </library>

+  </component>

+</project>

+

diff --git a/src/org/jsecurity/io/SerializationException.java b/src/org/jsecurity/io/SerializationException.java
index 144047c..f26949a 100644
--- a/src/org/jsecurity/io/SerializationException.java
+++ b/src/org/jsecurity/io/SerializationException.java
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2005-2008 Les Hazlewood
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.jsecurity.io;
 
 import org.jsecurity.JSecurityException;
diff --git a/test/org/jsecurity/ExceptionTest.java b/test/org/jsecurity/ExceptionTest.java
index ad7d714..a2d9768 100644
--- a/test/org/jsecurity/ExceptionTest.java
+++ b/test/org/jsecurity/ExceptionTest.java
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2005-2008 Les Hazlewood
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.jsecurity;
 
 import junit.framework.TestCase;
@@ -5,11 +20,7 @@
 import org.junit.Test;
 
 /**
- * Created by IntelliJ IDEA.
- * User: lhazlewood
- * Date: Mar 29, 2008
- * Time: 1:19:55 PM
- * To change this template use File | Settings | File Templates.
+ * @author Les Hazlewood
  */
 public abstract class ExceptionTest extends TestCase {
 
@@ -27,11 +38,11 @@
 
     @Test
     public void testCauseConstructor() throws Exception {
-        ClassUtils.newInstance(getExceptionClass(), new Throwable() );
+        ClassUtils.newInstance(getExceptionClass(), new Throwable());
     }
 
     @Test
     public void testMsgCauseConstructor() {
-        ClassUtils.newInstance(getExceptionClass(), "Msg", new Throwable() );
+        ClassUtils.newInstance(getExceptionClass(), "Msg", new Throwable());
     }
 }
diff --git a/test/org/jsecurity/authc/credential/AllowAllCredentialsMatcherTest.java b/test/org/jsecurity/authc/credential/AllowAllCredentialsMatcherTest.java
new file mode 100644
index 0000000..164c9ea
--- /dev/null
+++ b/test/org/jsecurity/authc/credential/AllowAllCredentialsMatcherTest.java
@@ -0,0 +1,32 @@
+/*

+ * Copyright 2005-2008 Les Hazlewood

+ *

+ * Licensed under the Apache License, Version 2.0 (the "License");

+ * you may not use this file except in compliance with the License.

+ * You may obtain a copy of the License at

+ *

+ *     http://www.apache.org/licenses/LICENSE-2.0

+ *

+ * Unless required by applicable law or agreed to in writing, software

+ * distributed under the License is distributed on an "AS IS" BASIS,

+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ * See the License for the specific language governing permissions and

+ * limitations under the License.

+ */

+package org.jsecurity.authc.credential;

+

+import static org.junit.Assert.assertTrue;

+import org.junit.Test;

+

+/**

+ * @author Les Hazlewood

+ * @since Jun 10, 2008 4:35:27 PM

+ */

+public class AllowAllCredentialsMatcherTest {

+

+    @Test

+    public void testBasic() {

+        assertTrue(new AllowAllCredentialsMatcher().doCredentialsMatch(null, null));

+    }

+

+}

diff --git a/test/org/jsecurity/authc/credential/HashedCredentialsMatcherTest.java b/test/org/jsecurity/authc/credential/HashedCredentialsMatcherTest.java
new file mode 100644
index 0000000..eca03e4
--- /dev/null
+++ b/test/org/jsecurity/authc/credential/HashedCredentialsMatcherTest.java
@@ -0,0 +1,45 @@
+/*

+ * Copyright 2005-2008 Les Hazlewood

+ *

+ * Licensed under the Apache License, Version 2.0 (the "License");

+ * you may not use this file except in compliance with the License.

+ * You may obtain a copy of the License at

+ *

+ *     http://www.apache.org/licenses/LICENSE-2.0

+ *

+ * Unless required by applicable law or agreed to in writing, software

+ * distributed under the License is distributed on an "AS IS" BASIS,

+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ * See the License for the specific language governing permissions and

+ * limitations under the License.

+ */

+package org.jsecurity.authc.credential;

+

+import junit.framework.TestCase;

+import org.jsecurity.authc.Account;

+import org.jsecurity.authc.AuthenticationToken;

+import org.jsecurity.authc.SimpleAccount;

+import org.jsecurity.authc.UsernamePasswordToken;

+import org.jsecurity.crypto.hash.AbstractHash;

+import org.jsecurity.util.ClassUtils;

+import org.junit.Test;

+

+/**

+ * @author Les Hazlewood

+ * @since Jun 10, 2008 4:47:09 PM

+ */

+public abstract class HashedCredentialsMatcherTest extends TestCase {

+

+    public abstract Class<? extends HashedCredentialsMatcher> getMatcherClass();

+

+    public abstract AbstractHash hash(Object credentials);

+

+    @Test

+    public void testBasic() {

+        CredentialsMatcher matcher = (CredentialsMatcher) ClassUtils.newInstance(getMatcherClass());

+        byte[] hashed = hash("password").getBytes();

+        Account account = new SimpleAccount("username", hashed, "realmName");

+        AuthenticationToken token = new UsernamePasswordToken("username", "password");

+        assertTrue(matcher.doCredentialsMatch(token, account));

+    }

+}

diff --git a/test/org/jsecurity/authc/credential/Md2CredentialsMatcherTest.java b/test/org/jsecurity/authc/credential/Md2CredentialsMatcherTest.java
new file mode 100644
index 0000000..12b2120
--- /dev/null
+++ b/test/org/jsecurity/authc/credential/Md2CredentialsMatcherTest.java
@@ -0,0 +1,34 @@
+/*

+ * Copyright 2005-2008 Les Hazlewood

+ *

+ * Licensed under the Apache License, Version 2.0 (the "License");

+ * you may not use this file except in compliance with the License.

+ * You may obtain a copy of the License at

+ *

+ *     http://www.apache.org/licenses/LICENSE-2.0

+ *

+ * Unless required by applicable law or agreed to in writing, software

+ * distributed under the License is distributed on an "AS IS" BASIS,

+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ * See the License for the specific language governing permissions and

+ * limitations under the License.

+ */

+package org.jsecurity.authc.credential;

+

+import org.jsecurity.crypto.hash.AbstractHash;

+import org.jsecurity.crypto.hash.Md2Hash;

+

+/**

+ * @author Les Hazlewood

+ * @since Jun 10, 2008 4:38:16 PM

+ */

+public class Md2CredentialsMatcherTest extends HashedCredentialsMatcherTest {

+

+    public Class<? extends HashedCredentialsMatcher> getMatcherClass() {

+        return Md2CredentialsMatcher.class;

+    }

+

+    public AbstractHash hash(Object credentials) {

+        return new Md2Hash(credentials);

+    }

+}

diff --git a/test/org/jsecurity/authc/credential/Md5CredentialsMatcherTest.java b/test/org/jsecurity/authc/credential/Md5CredentialsMatcherTest.java
new file mode 100644
index 0000000..462ffa3
--- /dev/null
+++ b/test/org/jsecurity/authc/credential/Md5CredentialsMatcherTest.java
@@ -0,0 +1,34 @@
+/*

+ * Copyright 2005-2008 Les Hazlewood

+ *

+ * Licensed under the Apache License, Version 2.0 (the "License");

+ * you may not use this file except in compliance with the License.

+ * You may obtain a copy of the License at

+ *

+ *     http://www.apache.org/licenses/LICENSE-2.0

+ *

+ * Unless required by applicable law or agreed to in writing, software

+ * distributed under the License is distributed on an "AS IS" BASIS,

+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ * See the License for the specific language governing permissions and

+ * limitations under the License.

+ */

+package org.jsecurity.authc.credential;

+

+import org.jsecurity.crypto.hash.AbstractHash;

+import org.jsecurity.crypto.hash.Md5Hash;

+

+/**

+ * @author Les Hazlewood

+ * @since Jun 10, 2008 4:59:36 PM

+ */

+public class Md5CredentialsMatcherTest extends HashedCredentialsMatcherTest {

+

+    public Class<? extends HashedCredentialsMatcher> getMatcherClass() {

+        return Md5CredentialsMatcher.class;

+    }

+

+    public AbstractHash hash(Object credentials) {

+        return new Md5Hash(credentials);

+    }

+}

diff --git a/test/org/jsecurity/authc/credential/Sha1CredentialsMatcherTest.java b/test/org/jsecurity/authc/credential/Sha1CredentialsMatcherTest.java
new file mode 100644
index 0000000..cdb6ea1
--- /dev/null
+++ b/test/org/jsecurity/authc/credential/Sha1CredentialsMatcherTest.java
@@ -0,0 +1,34 @@
+/*

+ * Copyright 2005-2008 Les Hazlewood

+ *

+ * Licensed under the Apache License, Version 2.0 (the "License");

+ * you may not use this file except in compliance with the License.

+ * You may obtain a copy of the License at

+ *

+ *     http://www.apache.org/licenses/LICENSE-2.0

+ *

+ * Unless required by applicable law or agreed to in writing, software

+ * distributed under the License is distributed on an "AS IS" BASIS,

+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ * See the License for the specific language governing permissions and

+ * limitations under the License.

+ */

+package org.jsecurity.authc.credential;

+

+import org.jsecurity.crypto.hash.AbstractHash;

+import org.jsecurity.crypto.hash.Sha1Hash;

+

+/**

+ * @author Les Hazlewood

+ * @since Jun 10, 2008 5:00:30 PM

+ */

+public class Sha1CredentialsMatcherTest extends HashedCredentialsMatcherTest {

+

+    public Class<? extends HashedCredentialsMatcher> getMatcherClass() {

+        return Sha1CredentialsMatcher.class;

+    }

+

+    public AbstractHash hash(Object credentials) {

+        return new Sha1Hash(credentials);

+    }

+}

diff --git a/test/org/jsecurity/authc/credential/Sha256CredentialsMatcherTest.java b/test/org/jsecurity/authc/credential/Sha256CredentialsMatcherTest.java
new file mode 100644
index 0000000..8081b8a
--- /dev/null
+++ b/test/org/jsecurity/authc/credential/Sha256CredentialsMatcherTest.java
@@ -0,0 +1,34 @@
+/*

+ * Copyright 2005-2008 Les Hazlewood

+ *

+ * Licensed under the Apache License, Version 2.0 (the "License");

+ * you may not use this file except in compliance with the License.

+ * You may obtain a copy of the License at

+ *

+ *     http://www.apache.org/licenses/LICENSE-2.0

+ *

+ * Unless required by applicable law or agreed to in writing, software

+ * distributed under the License is distributed on an "AS IS" BASIS,

+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ * See the License for the specific language governing permissions and

+ * limitations under the License.

+ */

+package org.jsecurity.authc.credential;

+

+import org.jsecurity.crypto.hash.AbstractHash;

+import org.jsecurity.crypto.hash.Sha256Hash;

+

+/**

+ * @author Les Hazlewood

+ * @since Jun 10, 2008 5:01:00 PM

+ */

+public class Sha256CredentialsMatcherTest extends HashedCredentialsMatcherTest {

+

+    public Class<? extends HashedCredentialsMatcher> getMatcherClass() {

+        return Sha256CredentialsMatcher.class;

+    }

+

+    public AbstractHash hash(Object credentials) {

+        return new Sha256Hash(credentials);

+    }

+}

diff --git a/test/org/jsecurity/authc/credential/Sha384CredentialsMatcherTest.java b/test/org/jsecurity/authc/credential/Sha384CredentialsMatcherTest.java
new file mode 100644
index 0000000..e53c353
--- /dev/null
+++ b/test/org/jsecurity/authc/credential/Sha384CredentialsMatcherTest.java
@@ -0,0 +1,34 @@
+/*

+ * Copyright 2005-2008 Les Hazlewood

+ *

+ * Licensed under the Apache License, Version 2.0 (the "License");

+ * you may not use this file except in compliance with the License.

+ * You may obtain a copy of the License at

+ *

+ *     http://www.apache.org/licenses/LICENSE-2.0

+ *

+ * Unless required by applicable law or agreed to in writing, software

+ * distributed under the License is distributed on an "AS IS" BASIS,

+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ * See the License for the specific language governing permissions and

+ * limitations under the License.

+ */

+package org.jsecurity.authc.credential;

+

+import org.jsecurity.crypto.hash.AbstractHash;

+import org.jsecurity.crypto.hash.Sha384Hash;

+

+/**

+ * @author Les Hazlewood

+ * @since Jun 10, 2008 5:02:27 PM

+ */

+public class Sha384CredentialsMatcherTest extends HashedCredentialsMatcherTest {

+

+    public Class<? extends HashedCredentialsMatcher> getMatcherClass() {

+        return Sha384CredentialsMatcher.class;

+    }

+

+    public AbstractHash hash(Object credentials) {

+        return new Sha384Hash(credentials);

+    }

+}

diff --git a/test/org/jsecurity/authc/credential/Sha512CredentialsMatcherTest.java b/test/org/jsecurity/authc/credential/Sha512CredentialsMatcherTest.java
new file mode 100644
index 0000000..3bc967f
--- /dev/null
+++ b/test/org/jsecurity/authc/credential/Sha512CredentialsMatcherTest.java
@@ -0,0 +1,34 @@
+/*

+ * Copyright 2005-2008 Les Hazlewood

+ *

+ * Licensed under the Apache License, Version 2.0 (the "License");

+ * you may not use this file except in compliance with the License.

+ * You may obtain a copy of the License at

+ *

+ *     http://www.apache.org/licenses/LICENSE-2.0

+ *

+ * Unless required by applicable law or agreed to in writing, software

+ * distributed under the License is distributed on an "AS IS" BASIS,

+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ * See the License for the specific language governing permissions and

+ * limitations under the License.

+ */

+package org.jsecurity.authc.credential;

+

+import org.jsecurity.crypto.hash.AbstractHash;

+import org.jsecurity.crypto.hash.Sha512Hash;

+

+/**

+ * @author Les Hazlewood

+ * @since Jun 10, 2008 5:02:58 PM

+ */

+public class Sha512CredentialsMatcherTest extends HashedCredentialsMatcherTest {

+

+    public Class<? extends HashedCredentialsMatcher> getMatcherClass() {

+        return Sha512CredentialsMatcher.class;

+    }

+

+    public AbstractHash hash(Object credentials) {

+        return new Sha512Hash(credentials);

+    }

+}

diff --git a/test/org/jsecurity/authc/credential/SimpleCredentialsMatcherTest.java b/test/org/jsecurity/authc/credential/SimpleCredentialsMatcherTest.java
new file mode 100644
index 0000000..e56be1e
--- /dev/null
+++ b/test/org/jsecurity/authc/credential/SimpleCredentialsMatcherTest.java
@@ -0,0 +1,30 @@
+/*

+ * Copyright 2005-2008 Les Hazlewood

+ *

+ * Licensed under the Apache License, Version 2.0 (the "License");

+ * you may not use this file except in compliance with the License.

+ * You may obtain a copy of the License at

+ *

+ *     http://www.apache.org/licenses/LICENSE-2.0

+ *

+ * Unless required by applicable law or agreed to in writing, software

+ * distributed under the License is distributed on an "AS IS" BASIS,

+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ * See the License for the specific language governing permissions and

+ * limitations under the License.

+ */

+package org.jsecurity.authc.credential;

+

+import org.junit.Test;

+

+/**

+ * @author Les Hazlewood

+ * @since Jun 10, 2008 4:40:15 PM

+ */

+public class SimpleCredentialsMatcherTest {

+

+    @Test

+    public void testBasic() {

+

+    }

+}

diff --git a/test/org/jsecurity/authz/AuthorizationExceptionTest.java b/test/org/jsecurity/authz/AuthorizationExceptionTest.java
new file mode 100644
index 0000000..b885b09
--- /dev/null
+++ b/test/org/jsecurity/authz/AuthorizationExceptionTest.java
@@ -0,0 +1,29 @@
+/*

+ * Copyright 2005-2008 Les Hazlewood

+ *

+ * Licensed under the Apache License, Version 2.0 (the "License");

+ * you may not use this file except in compliance with the License.

+ * You may obtain a copy of the License at

+ *

+ *     http://www.apache.org/licenses/LICENSE-2.0

+ *

+ * Unless required by applicable law or agreed to in writing, software

+ * distributed under the License is distributed on an "AS IS" BASIS,

+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ * See the License for the specific language governing permissions and

+ * limitations under the License.

+ */

+package org.jsecurity.authz;

+

+import org.jsecurity.ExceptionTest;

+

+/**

+ * @author Les Hazlewood

+ * @since Jun 10, 2008 4:03:56 PM

+ */

+public class AuthorizationExceptionTest extends ExceptionTest {

+

+    protected Class getExceptionClass() {

+        return AuthorizationException.class;

+    }

+}

diff --git a/test/org/jsecurity/authz/HostUnauthorizedExceptionTest.java b/test/org/jsecurity/authz/HostUnauthorizedExceptionTest.java
new file mode 100644
index 0000000..c6f98ab
--- /dev/null
+++ b/test/org/jsecurity/authz/HostUnauthorizedExceptionTest.java
@@ -0,0 +1,29 @@
+/*

+ * Copyright 2005-2008 Les Hazlewood

+ *

+ * Licensed under the Apache License, Version 2.0 (the "License");

+ * you may not use this file except in compliance with the License.

+ * You may obtain a copy of the License at

+ *

+ *     http://www.apache.org/licenses/LICENSE-2.0

+ *

+ * Unless required by applicable law or agreed to in writing, software

+ * distributed under the License is distributed on an "AS IS" BASIS,

+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ * See the License for the specific language governing permissions and

+ * limitations under the License.

+ */

+package org.jsecurity.authz;

+

+import org.jsecurity.ExceptionTest;

+

+/**

+ * @author Les Hazlewood

+ * @since Jun 10, 2008 4:04:38 PM

+ */

+public class HostUnauthorizedExceptionTest extends ExceptionTest {

+

+    protected Class getExceptionClass() {

+        return HostUnauthorizedException.class;

+    }

+}

diff --git a/test/org/jsecurity/authz/MissingAccountExceptionTest.java b/test/org/jsecurity/authz/MissingAccountExceptionTest.java
new file mode 100644
index 0000000..66a58aa
--- /dev/null
+++ b/test/org/jsecurity/authz/MissingAccountExceptionTest.java
@@ -0,0 +1,29 @@
+/*

+ * Copyright 2005-2008 Les Hazlewood

+ *

+ * Licensed under the Apache License, Version 2.0 (the "License");

+ * you may not use this file except in compliance with the License.

+ * You may obtain a copy of the License at

+ *

+ *     http://www.apache.org/licenses/LICENSE-2.0

+ *

+ * Unless required by applicable law or agreed to in writing, software

+ * distributed under the License is distributed on an "AS IS" BASIS,

+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ * See the License for the specific language governing permissions and

+ * limitations under the License.

+ */

+package org.jsecurity.authz;

+

+import org.jsecurity.ExceptionTest;

+

+/**

+ * @author Les Hazlewood

+ * @since Jun 10, 2008 4:05:26 PM

+ */

+public class MissingAccountExceptionTest extends ExceptionTest {

+

+    protected Class getExceptionClass() {

+        return MissingAccountException.class;

+    }

+}

diff --git a/test/org/jsecurity/authz/UnauthenticatedExceptionTest.java b/test/org/jsecurity/authz/UnauthenticatedExceptionTest.java
new file mode 100644
index 0000000..28c4eac
--- /dev/null
+++ b/test/org/jsecurity/authz/UnauthenticatedExceptionTest.java
@@ -0,0 +1,29 @@
+/*

+ * Copyright 2005-2008 Les Hazlewood

+ *

+ * Licensed under the Apache License, Version 2.0 (the "License");

+ * you may not use this file except in compliance with the License.

+ * You may obtain a copy of the License at

+ *

+ *     http://www.apache.org/licenses/LICENSE-2.0

+ *

+ * Unless required by applicable law or agreed to in writing, software

+ * distributed under the License is distributed on an "AS IS" BASIS,

+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ * See the License for the specific language governing permissions and

+ * limitations under the License.

+ */

+package org.jsecurity.authz;

+

+import org.jsecurity.ExceptionTest;

+

+/**

+ * @author Les Hazlewood

+ * @since Jun 10, 2008 4:06:15 PM

+ */

+public class UnauthenticatedExceptionTest extends ExceptionTest {

+

+    protected Class getExceptionClass() {

+        return UnauthenticatedException.class;

+    }

+}

diff --git a/test/org/jsecurity/authz/UnauthorizedExceptionTest.java b/test/org/jsecurity/authz/UnauthorizedExceptionTest.java
new file mode 100644
index 0000000..576704b
--- /dev/null
+++ b/test/org/jsecurity/authz/UnauthorizedExceptionTest.java
@@ -0,0 +1,29 @@
+/*

+ * Copyright 2005-2008 Les Hazlewood

+ *

+ * Licensed under the Apache License, Version 2.0 (the "License");

+ * you may not use this file except in compliance with the License.

+ * You may obtain a copy of the License at

+ *

+ *     http://www.apache.org/licenses/LICENSE-2.0

+ *

+ * Unless required by applicable law or agreed to in writing, software

+ * distributed under the License is distributed on an "AS IS" BASIS,

+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ * See the License for the specific language governing permissions and

+ * limitations under the License.

+ */

+package org.jsecurity.authz;

+

+import org.jsecurity.ExceptionTest;

+

+/**

+ * @author Les Hazlewood

+ * @since Jun 10, 2008 4:06:45 PM

+ */

+public class UnauthorizedExceptionTest extends ExceptionTest {

+

+    protected Class getExceptionClass() {

+        return UnauthorizedException.class;

+    }

+}

diff --git a/test/org/jsecurity/authz/UnsupportedAccountExceptionTest.java b/test/org/jsecurity/authz/UnsupportedAccountExceptionTest.java
new file mode 100644
index 0000000..36d8391
--- /dev/null
+++ b/test/org/jsecurity/authz/UnsupportedAccountExceptionTest.java
@@ -0,0 +1,29 @@
+/*

+ * Copyright 2005-2008 Les Hazlewood

+ *

+ * Licensed under the Apache License, Version 2.0 (the "License");

+ * you may not use this file except in compliance with the License.

+ * You may obtain a copy of the License at

+ *

+ *     http://www.apache.org/licenses/LICENSE-2.0

+ *

+ * Unless required by applicable law or agreed to in writing, software

+ * distributed under the License is distributed on an "AS IS" BASIS,

+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ * See the License for the specific language governing permissions and

+ * limitations under the License.

+ */

+package org.jsecurity.authz;

+

+import org.jsecurity.ExceptionTest;

+

+/**

+ * @author Les Hazlewood

+ * @since Jun 10, 2008 4:08:48 PM

+ */

+public class UnsupportedAccountExceptionTest extends ExceptionTest {

+

+    protected Class getExceptionClass() {

+        return UnsupportedAccountException.class;

+    }

+}

diff --git a/test/org/jsecurity/authz/permission/AllPermissionTest.java b/test/org/jsecurity/authz/permission/AllPermissionTest.java
new file mode 100644
index 0000000..9bd797e
--- /dev/null
+++ b/test/org/jsecurity/authz/permission/AllPermissionTest.java
@@ -0,0 +1,35 @@
+/*

+ * Copyright 2005-2008 Les Hazlewood

+ *

+ * Licensed under the Apache License, Version 2.0 (the "License");

+ * you may not use this file except in compliance with the License.

+ * You may obtain a copy of the License at

+ *

+ *     http://www.apache.org/licenses/LICENSE-2.0

+ *

+ * Unless required by applicable law or agreed to in writing, software

+ * distributed under the License is distributed on an "AS IS" BASIS,

+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ * See the License for the specific language governing permissions and

+ * limitations under the License.

+ */

+package org.jsecurity.authz.permission;

+

+import static org.junit.Assert.assertTrue;

+import org.junit.Test;

+

+/**

+ * @author Les Hazlewood

+ */

+public class AllPermissionTest {

+

+    @Test

+    public void testNullArgument() {

+        assertTrue(new AllPermission().implies(null));

+    }

+

+    @Test

+    public void testNonNullArgument() {

+        assertTrue(new AllPermission().implies(new AllPermission()));

+    }

+}

diff --git a/test/org/jsecurity/io/ResourceExceptionTest.java b/test/org/jsecurity/io/ResourceExceptionTest.java
new file mode 100644
index 0000000..33ace62
--- /dev/null
+++ b/test/org/jsecurity/io/ResourceExceptionTest.java
@@ -0,0 +1,28 @@
+/*

+ * Copyright 2005-2008 Les Hazlewood

+ *

+ * Licensed under the Apache License, Version 2.0 (the "License");

+ * you may not use this file except in compliance with the License.

+ * You may obtain a copy of the License at

+ *

+ *     http://www.apache.org/licenses/LICENSE-2.0

+ *

+ * Unless required by applicable law or agreed to in writing, software

+ * distributed under the License is distributed on an "AS IS" BASIS,

+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ * See the License for the specific language governing permissions and

+ * limitations under the License.

+ */

+package org.jsecurity.io;

+

+import org.jsecurity.ExceptionTest;

+

+/**

+ * @author Les Hazlewood

+ */

+public class ResourceExceptionTest extends ExceptionTest {

+

+    protected Class getExceptionClass() {

+        return ResourceException.class;

+    }

+}

diff --git a/test/org/jsecurity/io/SerializationExceptionTest.java b/test/org/jsecurity/io/SerializationExceptionTest.java
new file mode 100644
index 0000000..b1120a2
--- /dev/null
+++ b/test/org/jsecurity/io/SerializationExceptionTest.java
@@ -0,0 +1,28 @@
+/*

+ * Copyright 2005-2008 Les Hazlewood

+ *

+ * Licensed under the Apache License, Version 2.0 (the "License");

+ * you may not use this file except in compliance with the License.

+ * You may obtain a copy of the License at

+ *

+ *     http://www.apache.org/licenses/LICENSE-2.0

+ *

+ * Unless required by applicable law or agreed to in writing, software

+ * distributed under the License is distributed on an "AS IS" BASIS,

+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ * See the License for the specific language governing permissions and

+ * limitations under the License.

+ */

+package org.jsecurity.io;

+

+import org.jsecurity.ExceptionTest;

+

+/**

+ * @author Les Hazlewood

+ */

+public class SerializationExceptionTest extends ExceptionTest {

+

+    protected Class getExceptionClass() {

+        return SerializationException.class;

+    }

+}