Index: /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/LICENSE.txt
===================================================================
--- /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/LICENSE.txt	(revision 7180)
+++ /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/LICENSE.txt	(revision 7180)
@@ -0,0 +1,674 @@
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The "source code" for a work means the preferred form of the work
+for making modifications to it.  "Object code" means any non-source
+form of a work.
+
+  A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+  The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor's "contributor version".
+
+  A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others' Freedom.
+
+  If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Use with the GNU Affero General Public License.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+  14. Revised Versions of this License.
+
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+  Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+  If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+    <program>  Copyright (C) <year>  <name of author>
+    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+  You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+  The GNU General Public License does not permit incorporating your program
+into proprietary programs.  If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.  But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
Index: /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/pom.xml
===================================================================
--- /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/pom.xml	(revision 7180)
+++ /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/pom.xml	(revision 7180)
@@ -0,0 +1,280 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>eu.clarin.sru</groupId>
+    <artifactId>FCSEndpointTester</artifactId>
+    <version>1.0.0</version>
+    <packaging>war</packaging>
+    <name>Tester for CLARIN-FCS</name>
+    <description>A test-service to test CLARIN-FCS endpoints for protocol conformance</description>
+    <organization>
+        <name>IDS Mannheim</name>
+        <url>http://www.ids-mannheim.de/</url>
+    </organization>
+
+    <properties>
+        <!-- project settings -->
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <!-- plug-in settings -->
+        <maven.compiler.source>1.6</maven.compiler.source>
+        <maven.compiler.target>1.6</maven.compiler.target>
+        <!-- dependencies -->
+        <slf4j.version>1.7.25</slf4j.version>
+        <httpClient.version>4.5.4</httpClient.version>
+        <!-- Vaadin dependencies -->
+        <vaadin.version>7.7.13</vaadin.version>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-jdk14</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>commons-lang</groupId>
+            <artifactId>commons-lang</artifactId>
+            <version>2.6</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>joda-time</groupId>
+            <artifactId>joda-time</artifactId>
+            <version>2.1</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.reflections</groupId>
+            <artifactId>reflections</artifactId>
+            <version>0.9.10</version>
+        </dependency>
+
+        <dependency>
+            <groupId>eu.clarin.sru.fcs</groupId>
+            <artifactId>fcs-simple-client</artifactId>
+            <version>2.0.0</version>
+        </dependency>
+
+        <!-- 
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+            <version>2.5</version>
+            <scope>provided</scope>
+        </dependency>
+        -->
+
+        <!-- Vaadin -->
+        <dependency>
+            <groupId>com.vaadin</groupId>
+            <artifactId>vaadin-server</artifactId>
+            <version>${vaadin.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.vaadin</groupId>
+            <artifactId>vaadin-themes</artifactId>
+            <version>${vaadin.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.vaadin</groupId>
+            <artifactId>vaadin-client</artifactId>
+            <version>${vaadin.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.vaadin</groupId>
+            <artifactId>vaadin-client-compiler</artifactId>
+            <version>${vaadin.version}</version>
+            <scope>provided</scope>
+        </dependency>
+        
+        <!-- 
+        <dependency>
+            <groupId>com.vaadin</groupId>
+            <artifactId>vaadin-push</artifactId>
+            <version>${vaadin.version}</version>
+        </dependency>
+        -->
+
+        <!-- Vaadin add-ons
+            
+             Make sure to include all widgets in 'Widgetset.gwt.xml'!
+        -->
+        <dependency>
+            <groupId>org.vaadin.addons</groupId>
+            <artifactId>popupbutton</artifactId>
+            <version>2.6.0</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.vaadin.addons</groupId>
+            <artifactId>animator</artifactId>
+            <version>1.7.3</version>
+        </dependency>
+    </dependencies>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.slf4j</groupId>
+                <artifactId>slf4j-api</artifactId>
+                <version>${slf4j.version}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>org.slf4j</groupId>
+                <artifactId>slf4j-jdk14</artifactId>
+                <version>${slf4j.version}</version>
+            </dependency>
+
+            <dependency>
+                <groupId>org.apache.httpcomponents</groupId>
+                <artifactId>httpclient</artifactId>
+                <version>${httpClient.version}</version>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>3.6.0</version>
+                <configuration>
+                    <encoding>${project.source.encoding}</encoding>
+                    <source>${maven.compiler.source}</source>
+                    <target>${maven.compiler.target}</target>
+                </configuration>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-resources-plugin</artifactId>
+                <version>3.0.1</version>
+                <configuration>
+                    <encoding>${project.source.encoding}</encoding>
+                </configuration>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-war-plugin</artifactId>
+                <version>2.6</version>
+                <configuration>
+                    <webResources>
+                        <resource>
+                            <directory>${project.build.directory}/vaadin-webapp/</directory>
+                            <filtering>false</filtering>
+                            <excludes>
+                                <exclude>**/deploy/**</exclude>
+                                <exclude>**/gwt-unitCache/**</exclude>
+                            </excludes>
+                        </resource>
+                    </webResources>
+                </configuration>
+            </plugin>
+
+            <plugin>
+                <groupId>com.vaadin</groupId>
+                <artifactId>vaadin-maven-plugin</artifactId>
+                <version>${vaadin.version}</version>
+                <configuration>
+                    <!-- <runTarget>mobilemail</runTarget> -->
+                    <!--
+                    <noServer>true</noServer>
+                    <!- - Remove draftCompile when project is ready - ->
+                    <draftCompile>false</draftCompile>
+                    <compileReport>true</compileReport>
+                    <style>OBF</style>
+                    <strict>true</strict>
+                    <runTarget>http://localhost:8080/</runTarget>
+                     -->
+                    <extraJvmArgs>-Xmx512M -Xss1024k</extraJvmArgs>
+                    <webappDirectory>${project.build.directory}/vaadin-webapp/VAADIN/widgetsets</webappDirectory>
+                    <noServer>true</noServer>
+                    <draftCompile>false</draftCompile>
+                    <compileReport>false</compileReport>
+                    <style>OBF</style>
+                    <strict>true</strict>
+                    <soyc>false</soyc>
+                </configuration>
+                <executions>
+                    <execution>
+                        <configuration>
+                            <!-- if you don't specify any modules, the plugin 
+                                will find them -->
+                            <!--
+                            <modules>
+                                <module>com.vaadin.demo.mobilemail.gwt.ColorPickerWidgetSet</module> 
+                            </modules>
+                            -->
+                        </configuration>
+                        <goals>
+                            <goal>resources</goal>
+                            <goal>compile</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>org.eclipse.m2e</groupId>
+                    <artifactId>lifecycle-mapping</artifactId>
+                    <version>1.0.0</version>
+                    <configuration>
+                        <lifecycleMappingMetadata>
+                            <pluginExecutions>
+                                <pluginExecution>
+                                    <pluginExecutionFilter>
+                                        <groupId>com.vaadin</groupId>
+                                        <artifactId>vaadin-maven-plugin</artifactId>
+                                        <versionRange>
+                                            [${vaadin.version},)
+                                        </versionRange>
+                                        <goals>
+                                            <goal>resources</goal>
+                                            <goal>compile</goal>
+                                        </goals>
+                                    </pluginExecutionFilter>
+                                    <action>
+                                        <execute />
+                                    </action>
+                                </pluginExecution>
+                            </pluginExecutions>
+                        </lifecycleMappingMetadata>
+                    </configuration>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
+
+    <repositories>
+        <repository>
+            <id>clarin</id>
+            <url>http://catalog.clarin.eu/ds/nexus/content/repositories/Clarin/</url>
+        </repository>
+
+        <repository>
+            <id>vaadin-addons</id>
+            <url>http://maven.vaadin.com/vaadin-addons</url>
+        </repository>
+    </repositories>
+</project>
Index: /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/FCSEndpointTester.java
===================================================================
--- /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/FCSEndpointTester.java	(revision 7180)
+++ /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/FCSEndpointTester.java	(revision 7180)
@@ -0,0 +1,455 @@
+/**
+ * This software is copyright (c) 2013 by
+ *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ * This is free software. You can redistribute it
+ * and/or modify it under the terms described in
+ * the GNU General Public License v3 of which you
+ * should have received a copy. Otherwise you can download
+ * it from
+ *
+ *   http://www.gnu.org/licenses/gpl-3.0.txt
+ *
+ * @copyright Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ *
+ * @license http://www.gnu.org/licenses/gpl-3.0.txt
+ *  GNU General Public License v3
+ */
+package eu.clarin.fcs.tester;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.RejectedExecutionException;
+import java.util.concurrent.TimeUnit;
+import java.util.logging.Handler;
+import java.util.logging.Level;
+import java.util.logging.LogRecord;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+import org.apache.http.HttpResponse;
+import org.apache.http.HttpStatus;
+import org.apache.http.StatusLine;
+import org.apache.http.client.ClientProtocolException;
+import org.apache.http.client.config.CookieSpecs;
+import org.apache.http.client.config.RequestConfig;
+import org.apache.http.client.methods.HttpHead;
+import org.apache.http.client.utils.HttpClientUtils;
+import org.apache.http.config.SocketConfig;
+import org.apache.http.impl.NoConnectionReuseStrategy;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
+import org.reflections.Reflections;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import eu.clarin.sru.client.SRUClient;
+import eu.clarin.sru.client.SRUClientException;
+import eu.clarin.sru.client.SRUExplainRequest;
+import eu.clarin.sru.client.SRUExplainResponse;
+import eu.clarin.sru.client.SRUSimpleClient;
+import eu.clarin.sru.client.SRUVersion;
+import eu.clarin.sru.client.fcs.ClarinFCSClientBuilder;
+import eu.clarin.sru.client.fcs.ClarinFCSConstants;
+import eu.clarin.sru.client.fcs.ClarinFCSEndpointDescription;
+import eu.clarin.sru.client.fcs.ClarinFCSEndpointDescriptionParser;
+
+
+public class FCSEndpointTester implements ServletContextListener {
+    public interface ProgressListener {
+        public void updateProgress(String message);
+
+        public void updateMaximum(int maximum);
+
+        public void onDone(FCSTestContext context, List<FCSTestResult> results);
+
+        public void onError(String message, Throwable e);
+    }
+    private static final String TESTCASE_PACKAGE =
+            "eu.clarin.fcs.tester.tests";
+    private static final String USER_AGENT = "FCSEndpointTester/1.0.0";
+    private static final int DEFAULT_CONNECT_TIMEOUT = -1;
+    private static final int DEFAULT_SOCKET_TIMEOUT  = -1;
+    private static final List<FCSTest> TESTS;
+    private static final Logger logger =
+            LoggerFactory.getLogger(FCSEndpointTester.class);
+    private final FCSLoggingHandler logcapturehandler =
+            new FCSLoggingHandler();
+    private final ExecutorService executor = Executors.newCachedThreadPool();
+    private static final FCSEndpointTester INSTANCE = new FCSEndpointTester();
+
+
+    public static FCSEndpointTester getInstance() {
+        return INSTANCE;
+    }
+
+
+    private void destroy() {
+        executor.shutdownNow();
+        try {
+            executor.awaitTermination(5000, TimeUnit.MILLISECONDS);
+            logger.debug("thread pool terminated");
+        } catch (InterruptedException e) {
+            /* IGNORE */
+        }
+    }
+
+
+    private static CloseableHttpClient createHttpClient(int connectTimeout,
+            int socketTimeout) {
+        final PoolingHttpClientConnectionManager manager =
+                new PoolingHttpClientConnectionManager();
+        manager.setDefaultMaxPerRoute(8);
+        manager.setMaxTotal(128);
+
+        final SocketConfig socketConfig = SocketConfig.custom()
+                .setSoReuseAddress(true)
+                .setSoLinger(0)
+                .build();
+
+        final RequestConfig requestConfig = RequestConfig.custom()
+                .setAuthenticationEnabled(false)
+                .setRedirectsEnabled(true)
+                .setMaxRedirects(4)
+                .setCircularRedirectsAllowed(false)
+                .setCookieSpec(CookieSpecs.IGNORE_COOKIES)
+                .setConnectTimeout(connectTimeout)
+                .setSocketTimeout(socketTimeout)
+                .setConnectionRequestTimeout(0) /* infinite */
+                .build();
+
+        return HttpClients.custom()
+                .setUserAgent(USER_AGENT)
+                .setConnectionManager(manager)
+                .setDefaultSocketConfig(socketConfig)
+                .setDefaultRequestConfig(requestConfig)
+                .setConnectionReuseStrategy(new NoConnectionReuseStrategy())
+                .build();
+    }
+
+
+    public void performTests(final ProgressListener listener,
+            final FCSTestProfile profile,
+            final String endpointURI,
+            final String searchTerm,
+            final boolean strictMode,
+            final boolean performProbeQuest,
+            final int connectTimeout,
+            final int socketTimeout) {
+        if (listener == null) {
+            throw new NullPointerException("listener == null");
+        }
+        try {
+            executor.submit(new Runnable() {
+                @Override
+                public void run() {
+                    try {
+                        FCSTestContext context = null;
+                        if (performProbeQuest) {
+                            doPerformProbeRequest(listener, endpointURI);
+                        }
+                        // auto-detect FCS version?
+                        if (profile == null) {
+                            context = doPerformAutodetect(listener,
+                                    endpointURI,
+                                    searchTerm,
+                                    strictMode,
+                                    connectTimeout,
+                                    socketTimeout);
+                        } else {
+                            context = new FCSTestContext(profile,
+                                    endpointURI,
+                                    searchTerm,
+                                    strictMode,
+                                    connectTimeout,
+                                    socketTimeout);
+                        }
+                        context.init();
+                        doPerformTests(listener, context);
+                    } catch (IOException e) {
+                        listener.onError("An error occurred", e);
+                    } catch (SRUClientException e) {
+                        listener.onError(e.getMessage(), e.getCause());
+                    } catch (Throwable t) {
+                        logger.error("Internal error!", t);
+                        listener.onError("Internal error!", t);
+                    }
+                }
+            });
+        } catch (RejectedExecutionException e) {
+            listener.onError("Error starting tests", null);
+        }
+    }
+
+
+    private FCSTestContext doPerformAutodetect(final ProgressListener listener,
+            final String endpointURI,
+            final String searchTerm,
+            final boolean strictMode,
+            final int connectTimeout,
+            final int socketTimeout) throws SRUClientException {
+        listener.updateProgress("Detecting CLARIN-FCS profile ...");
+
+        FCSTestProfile profile = null;
+
+        SRUClient client = new ClarinFCSClientBuilder()
+                .addDefaultDataViewParsers()
+                .setDefaultSRUVersion(SRUVersion.VERSION_2_0)
+                .unknownDataViewAsString()
+                .enableLegacySupport()
+                .registerExtraResponseDataParser(
+                        new ClarinFCSEndpointDescriptionParser())
+                .buildClient();
+
+        try {
+            SRUExplainRequest request = new SRUExplainRequest(endpointURI);
+            request.setStrictMode(false);
+            request.setVersion(SRUVersion.VERSION_1_2);
+            request.setExtraRequestData(ClarinFCSConstants.X_FCS_ENDPOINT_DESCRIPTION,
+                    ClarinFCSConstants.TRUE);
+            request.setParseRecordDataEnabled(true);
+            SRUExplainResponse response = client.explain(request);
+
+            ClarinFCSEndpointDescription ed =
+                    response.getFirstExtraResponseData(ClarinFCSEndpointDescription.class);
+            if (ed != null) {
+                if (ed.getVersion() == 1) {
+                    profile = FCSTestProfile.CLARIN_FCS_1_0;
+                }
+            } else {
+                logger.debug("assume legacy");
+                profile = FCSTestProfile.CLARIN_FCS_LEGACY;
+            }
+
+            if (profile == null) {
+                request = new SRUExplainRequest(endpointURI);
+                request.setStrictMode(false);
+                request.setVersion(SRUVersion.VERSION_2_0);
+                request.setExtraRequestData(
+                        ClarinFCSConstants.X_FCS_ENDPOINT_DESCRIPTION,
+                        ClarinFCSConstants.TRUE);
+                request.setParseRecordDataEnabled(true);
+                try {
+                    response = client.explain(request);
+
+                    ed = response.getFirstExtraResponseData(
+                            ClarinFCSEndpointDescription.class);
+                    if (ed != null) {
+                        if (ed.getVersion() == 2) {
+                            profile = FCSTestProfile.CLARIN_FCS_2_0;
+                        }
+                    }
+                } catch (SRUClientException e) {
+                    if ((e.getMessage() != null) && (e.getMessage()
+                            .contains("responded with different version"))) {
+                        throw new SRUClientException(
+                                "Seriously broken Endpoint: when trying to " +
+                                "detect FCS 2.0 the Endpoint illegally " +
+                                "responded with a SRU 1.2 reponse to a " +
+                                "SRU 2.0 request!");
+                    } else {
+                        throw e;
+                    }
+                }
+            }
+            if (profile != null) {
+                final FCSTestContext context =
+                        new FCSTestContext(profile,
+                                endpointURI,
+                                searchTerm,
+                                strictMode,
+                                connectTimeout,
+                                socketTimeout);
+                return context;
+            }
+        } catch (SRUClientException e) {
+            logger.error("error", e);
+            throw new SRUClientException("An error occured while " +
+                    "auto-detecting CLARIN-FCS version", e);
+        }
+        throw new SRUClientException("Unable to auto-detect CLARIN-FCS version!");
+    }
+
+
+    private void doPerformTests(final ProgressListener listener,
+            final FCSTestContext context) {
+        /* make sure that we'll capture the logging records */
+        java.util.logging.Logger l =
+                java.util.logging.Logger.getLogger("eu.clarin.sru");
+        l.setLevel(Level.FINEST);
+        boolean found = false;
+        Handler[] handlers = l.getHandlers();
+        if (handlers != null) {
+            for (Handler handler : handlers) {
+                if (handler == logcapturehandler) {
+                    found = true;
+                    break;
+                }
+            }
+        }
+        if (!found) {
+            l.addHandler(logcapturehandler);
+        }
+
+
+        List<FCSTest> tests = new ArrayList<FCSTest>();
+        for (FCSTest test : TESTS) {
+            final FCSTestCase tc =
+                    test.getClass().getAnnotation(FCSTestCase.class);
+            if (Arrays.binarySearch(tc.profiles(), context.getProfile()) >= 0) {
+                tests.add(test);
+            }
+        }
+
+        List<FCSTestResult> results = null;
+
+        final SRUSimpleClient client = context.getClient();
+        final FCSTestHandler handler = new FCSTestHandler();
+        final int totalCount = tests.size();
+        int num = 1;
+        listener.updateMaximum(totalCount);
+        for (FCSTest test : tests) {
+            if (results == null) {
+                results = new LinkedList<FCSTestResult>();
+            }
+
+            logger.debug("running test {}:{}", num, test.getName());
+            final String message = String.format(
+                    "Performing test \"%s:%s\" (%d/%d) ...",
+                    context.getProfile().toDisplayString(),
+                    test.getName(), num, totalCount);
+            listener.updateProgress(message);
+            num++;
+
+            FCSTestResult result = null;
+            try {
+                handler.reset();
+                logcapturehandler.publish(new LogRecord(Level.FINE,
+                        "running test class " + test.getClass().getName()));
+                result = test.perform(context, client, handler);
+                result.setLogRecords(logcapturehandler.getLogRecords());
+            } catch (SRUClientException e) {
+                String msg = e.getMessage();
+                if (msg == null) {
+                    msg = "unclassified exception from SRUClient";
+                }
+                final LogRecord record = new LogRecord(Level.SEVERE, msg);
+                record.setThrown(e);
+                logcapturehandler.publish(record);
+                result = new FCSTestResult(test,
+                        FCSTestResult.Code.ERROR,
+                        msg,
+                        logcapturehandler.getLogRecords());
+            } catch (Throwable t) {
+                final LogRecord record =
+                        new LogRecord(Level.SEVERE, "Internal Error!");
+                record.setThrown(t);
+                logcapturehandler.publish(record);
+                result = new FCSTestResult(test,
+                        FCSTestResult.Code.ERROR,
+                        record.getMessage(),
+                        logcapturehandler.getLogRecords());
+            }
+            results.add(result);
+        } // for
+        listener.onDone(context, results);
+    }
+
+
+    private void doPerformProbeRequest(final ProgressListener listener,
+            final String baseURI) throws IOException {
+        try {
+            logger.debug("performing initial probe request to {}",
+                    baseURI);
+            listener.updateProgress(
+                    "Performing HTTP HEAD probe request ...");
+            final CloseableHttpClient client =
+                    createHttpClient(DEFAULT_CONNECT_TIMEOUT,
+                            DEFAULT_SOCKET_TIMEOUT);
+            final HttpHead request = new HttpHead(baseURI);
+            HttpResponse response = null;
+            try {
+                response = client.execute(request);
+                StatusLine status = response.getStatusLine();
+                if (status.getStatusCode() != HttpStatus.SC_OK) {
+                    throw new IOException("Probe request to endpoint " +
+                            "returned unexpected HTTP status " +
+                            status.getStatusCode());
+                }
+            } finally {
+                HttpClientUtils.closeQuietly(response);
+
+                HttpClientUtils.closeQuietly(client);
+            }
+        } catch (ClientProtocolException e) {
+            throw new IOException(e);
+        }
+    }
+
+
+    @Override
+    public void contextInitialized(ServletContextEvent event) {
+        logger.info("initialized");
+    }
+
+
+    @Override
+    public void contextDestroyed(ServletContextEvent event) {
+        logger.info("shutting down ...");
+        INSTANCE.destroy();
+    }
+
+
+    static {
+        List<FCSTest> tests = null;
+        try {
+            Reflections reflections = new Reflections(TESTCASE_PACKAGE);
+            Set<Class<?>> annotations =
+                    reflections.getTypesAnnotatedWith(FCSTestCase.class);
+            if ((annotations != null) && !annotations.isEmpty()) {
+                List<Class<?>> classes = new ArrayList<Class<?>>(
+                        annotations.size());
+                for (Class<?> clazz : annotations) {
+                    FCSTestCase tc = clazz.getAnnotation(FCSTestCase.class);
+                    if ((tc != null) && (tc.priority() >= 0)) {
+                        classes.add(clazz);
+                    }
+                }
+                Collections.sort(classes, new Comparator<Class<?>>() {
+                    @Override
+                    public int compare(Class<?> o1, Class<?> o2) {
+                        FCSTestCase a1 = o1.getAnnotation(FCSTestCase.class);
+                        FCSTestCase a2 = o2.getAnnotation(FCSTestCase.class);
+                        return a1.priority() - a2.priority();
+                    }
+                });
+                for (Class<?> clazz : classes) {
+                    if (tests == null) {
+                        tests = new ArrayList<FCSTest>(classes.size());
+                    }
+                    tests.add((FCSTest) clazz.newInstance());
+                }
+            }
+        } catch (InstantiationException e) {
+            e.printStackTrace();
+        } catch (IllegalAccessException e) {
+            e.printStackTrace();
+        }
+
+        if (tests != null) {
+            TESTS = Collections.unmodifiableList(tests);
+        } else {
+            TESTS = Collections.emptyList();
+        }
+    }
+
+} // class SRUEndpointTester
Index: /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/FCSLoggingHandler.java
===================================================================
--- /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/FCSLoggingHandler.java	(revision 7180)
+++ /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/FCSLoggingHandler.java	(revision 7180)
@@ -0,0 +1,64 @@
+/**
+ * This software is copyright (c) 2013 by
+ *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ * This is free software. You can redistribute it
+ * and/or modify it under the terms described in
+ * the GNU General Public License v3 of which you
+ * should have received a copy. Otherwise you can download
+ * it from
+ *
+ *   http://www.gnu.org/licenses/gpl-3.0.txt
+ *
+ * @copyright Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ *
+ * @license http://www.gnu.org/licenses/gpl-3.0.txt
+ *  GNU General Public License v3
+ */
+package eu.clarin.fcs.tester;
+
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.logging.Handler;
+import java.util.logging.LogRecord;
+
+
+class FCSLoggingHandler extends Handler {
+    public final Map<Long, List<LogRecord>> messages =
+            new HashMap<Long, List<LogRecord>>();
+
+
+    @Override
+    public void publish(LogRecord record) {
+        final Long id = Thread.currentThread().getId();
+
+        List<LogRecord> records = null;
+        synchronized (messages) {
+            records = messages.get(id);
+            if (records == null) {
+                records = new LinkedList<LogRecord>();
+                messages.put(id, records);
+            }
+        } // synchronized (messages)
+        records.add(record);
+    }
+
+
+    @Override
+    public void flush() {
+    }
+
+
+    @Override
+    public void close() throws SecurityException {
+    }
+
+
+    List<LogRecord> getLogRecords() {
+        synchronized (messages) {
+            return messages.remove(Thread.currentThread().getId());
+        } // synchronized (messages)
+    }
+
+} // class SRULoggingHandler
Index: /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/FCSTest.java
===================================================================
--- /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/FCSTest.java	(revision 7180)
+++ /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/FCSTest.java	(revision 7180)
@@ -0,0 +1,111 @@
+/**
+ * This software is copyright (c) 2013 by
+ *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ * This is free software. You can redistribute it
+ * and/or modify it under the terms described in
+ * the GNU General Public License v3 of which you
+ * should have received a copy. Otherwise you can download
+ * it from
+ *
+ *   http://www.gnu.org/licenses/gpl-3.0.txt
+ *
+ * @copyright Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ *
+ * @license http://www.gnu.org/licenses/gpl-3.0.txt
+ *  GNU General Public License v3
+ */
+package eu.clarin.fcs.tester;
+
+import java.util.List;
+import java.util.logging.LogRecord;
+
+
+import eu.clarin.sru.client.SRUClientException;
+import eu.clarin.sru.client.SRUSimpleClient;
+
+
+public abstract class FCSTest {
+    public abstract String getName();
+
+
+    public abstract String getDescription();
+
+
+    public abstract String getExpected();
+
+
+    public abstract FCSTestResult perform(FCSTestContext context,
+            SRUSimpleClient client, FCSTestHandler handler)
+            throws SRUClientException;
+
+
+    protected String escapeCQL(String q) {
+        if (q.contains(" ")) {
+            return "\"" + q + "\"";
+        } else {
+            return q;
+        }
+    }
+
+    
+    protected String escapeFCS(String q) {
+        StringBuilder sb = new StringBuilder();
+        sb.append("\"");
+        for (int i = 0; i < q.length(); i++) {
+            final char ch = q.charAt(i);
+            switch (ch) {
+            case '\\':
+                sb.append("\\\\");
+                break;
+            case '\'':
+                sb.append("\\'");
+                break;
+            default:
+                sb.append(ch);
+            }
+        }
+        sb.append("\"");
+        return sb.toString();
+    }
+
+
+    protected FCSTestResult makeSuccess() {
+        return new FCSTestResult(this, FCSTestResult.Code.SUCCESS,
+                "The test case was processed successfully");
+    }
+
+
+    protected FCSTestResult makeWarning(String message) {
+        return new FCSTestResult(this, FCSTestResult.Code.WARNING, message);
+    }
+
+
+    protected FCSTestResult makeWarningUnexpectedDiagnostics() {
+        return new FCSTestResult(this, FCSTestResult.Code.WARNING,
+                "One or more unexpected diagnostic reported by endpoint");
+    }
+
+
+    protected FCSTestResult makeGenericError() {
+        return new FCSTestResult(this, FCSTestResult.Code.ERROR,
+                "Something went wrong");
+    }
+
+
+    protected FCSTestResult makeError(String message) {
+        return new FCSTestResult(this, FCSTestResult.Code.ERROR, message);
+    }
+
+
+    protected FCSTestResult makeError(List<LogRecord> records) {
+        return new FCSTestResult(this, FCSTestResult.Code.ERROR,
+                "An error occurred while processing the test case", records);
+    }
+
+
+    protected FCSTestResult makeErrorNoDiagnostic(String diagnostic) {
+        return new FCSTestResult(this, FCSTestResult.Code.ERROR, String.format(
+                "Endpoint did not report expected diagnostic: %s", diagnostic));
+    }
+
+} // class FCSTest
Index: /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/FCSTestCase.java
===================================================================
--- /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/FCSTestCase.java	(revision 7180)
+++ /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/FCSTestCase.java	(revision 7180)
@@ -0,0 +1,30 @@
+/**
+ * This software is copyright (c) 2013 by
+ *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ * This is free software. You can redistribute it
+ * and/or modify it under the terms described in
+ * the GNU General Public License v3 of which you
+ * should have received a copy. Otherwise you can download
+ * it from
+ *
+ *   http://www.gnu.org/licenses/gpl-3.0.txt
+ *
+ * @copyright Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ *
+ * @license http://www.gnu.org/licenses/gpl-3.0.txt
+ *  GNU General Public License v3
+ */
+package eu.clarin.fcs.tester;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface FCSTestCase {
+    public int priority();
+    public FCSTestProfile[] profiles();
+} // annotation FCSTestCase
Index: /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/FCSTestContext.java
===================================================================
--- /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/FCSTestContext.java	(revision 7180)
+++ /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/FCSTestContext.java	(revision 7180)
@@ -0,0 +1,172 @@
+/**
+ * This software is copyright (c) 2013 by
+ *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ * This is free software. You can redistribute it
+ * and/or modify it under the terms described in
+ * the GNU General Public License v3 of which you
+ * should have received a copy. Otherwise you can download
+ * it from
+ *
+ *   http://www.gnu.org/licenses/gpl-3.0.txt
+ *
+ * @copyright Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ *
+ * @license http://www.gnu.org/licenses/gpl-3.0.txt
+ *  GNU General Public License v3
+ */
+package eu.clarin.fcs.tester;
+
+import org.apache.commons.lang.RandomStringUtils;
+
+import eu.clarin.sru.client.SRUExplainRequest;
+import eu.clarin.sru.client.SRUScanRequest;
+import eu.clarin.sru.client.SRUSearchRetrieveRequest;
+import eu.clarin.sru.client.SRUSimpleClient;
+import eu.clarin.sru.client.SRUVersion;
+import eu.clarin.sru.client.fcs.ClarinFCSClientBuilder;
+import eu.clarin.sru.client.fcs.ClarinFCSEndpointDescriptionParser;
+
+
+public class FCSTestContext {
+    private final FCSTestProfile profile;
+    private final String baseURI;
+    private final String userSearchTerm;
+    private final boolean strictMode;
+    private final int connectTimeout;
+    private final int socketTimeout;
+    private final String randomSearchTerm =
+            RandomStringUtils.randomAlphanumeric(16);
+    private final String unicodeSearchTerm = "Ã¶Ã€ÃŒÃÃÃÃâ¬";
+    private SRUSimpleClient client;
+
+
+    public FCSTestContext(FCSTestProfile profile, String baseURI,
+            String userSearchTerm, boolean strictMode, int connectTimeout,
+            int socketTimeout) {
+        if (profile == null) {
+            throw new NullPointerException("profile == null");
+        }
+        this.profile = profile;
+        if (baseURI == null) {
+            throw new NullPointerException("baseURI == null");
+        }
+        this.baseURI = baseURI;
+        this.connectTimeout = connectTimeout;
+        this.socketTimeout = socketTimeout;
+        this.strictMode = strictMode;
+        if (userSearchTerm.indexOf(' ') != -1) {
+            this.userSearchTerm = "\"" + userSearchTerm + "\"";
+        } else {
+            this.userSearchTerm = userSearchTerm;
+        }
+    }
+
+
+    public void init() {
+        if (client != null) {
+            throw new IllegalStateException("already initialized!");
+        }
+
+        ClarinFCSClientBuilder builder = null;
+        switch (profile) {
+        case CLARIN_FCS_1_0:
+            builder = new ClarinFCSClientBuilder()
+                .addDefaultDataViewParsers()
+                .setDefaultSRUVersion(SRUVersion.VERSION_1_2)
+                .unknownDataViewAsString()
+                .registerExtraResponseDataParser(
+                        new ClarinFCSEndpointDescriptionParser());
+            if (!strictMode) {
+                builder.enableLegacySupport();
+            }
+            break;
+        case CLARIN_FCS_2_0:
+            builder = new ClarinFCSClientBuilder()
+                .addDefaultDataViewParsers()
+                .setDefaultSRUVersion(SRUVersion.VERSION_2_0)
+                .unknownDataViewAsString()
+                .registerExtraResponseDataParser(
+                        new ClarinFCSEndpointDescriptionParser());
+            break;
+        case CLARIN_FCS_LEGACY:
+            builder = new ClarinFCSClientBuilder()
+                .addDefaultDataViewParsers()
+                .setDefaultSRUVersion(SRUVersion.VERSION_1_2)
+                .unknownDataViewAsString()
+                .enableLegacySupport()
+                .enableFullLegacyCompatMode();
+            break;
+        }
+        client = builder.buildSimpleClient();
+    }
+
+
+    public FCSTestProfile getProfile() {
+        return profile;
+    }
+
+
+    public String getBaseURI() {
+        return baseURI;
+    }
+
+
+    public boolean isStrictMode() {
+        return strictMode;
+    }
+
+
+    public int getConnectTimeout() {
+        return connectTimeout;
+    }
+
+
+    public int getSocketTimeout() {
+        return socketTimeout;
+    }
+
+
+    public String getUserSearchTerm() {
+        return userSearchTerm;
+    }
+
+
+    public String getRandomSearchTerm() {
+        return randomSearchTerm;
+    }
+
+
+    public String getUnicodeSearchTerm() {
+        return unicodeSearchTerm;
+    }
+
+
+    public SRUSimpleClient getClient() {
+        return client;
+    }
+
+
+    public SRUExplainRequest createExplainRequest() {
+        SRUExplainRequest request =
+                new SRUExplainRequest(baseURI.toString());
+        request.setStrictMode(strictMode);
+        return request;
+    }
+
+
+    public SRUScanRequest createScanRequest() {
+        SRUScanRequest request =
+                new SRUScanRequest(baseURI.toString());
+        request.setStrictMode(strictMode);
+        return request;
+    }
+
+
+    public SRUSearchRetrieveRequest createSearchRetrieveRequest() {
+        SRUSearchRetrieveRequest request =
+                new SRUSearchRetrieveRequest(baseURI.toString());
+        request.setStrictMode(strictMode);
+        return request;
+    }
+
+} // class FCSTestContext
Index: /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/FCSTestHandler.java
===================================================================
--- /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/FCSTestHandler.java	(revision 7180)
+++ /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/FCSTestHandler.java	(revision 7180)
@@ -0,0 +1,172 @@
+/**
+ * This software is copyright (c) 2013 by
+ *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ * This is free software. You can redistribute it
+ * and/or modify it under the terms described in
+ * the GNU General Public License v3 of which you
+ * should have received a copy. Otherwise you can download
+ * it from
+ *
+ *   http://www.gnu.org/licenses/gpl-3.0.txt
+ *
+ * @copyright Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ *
+ * @license http://www.gnu.org/licenses/gpl-3.0.txt
+ *  GNU General Public License v3
+ */
+package eu.clarin.fcs.tester;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import eu.clarin.sru.client.SRUClientException;
+import eu.clarin.sru.client.SRUDefaultHandlerAdapter;
+import eu.clarin.sru.client.SRUDiagnostic;
+import eu.clarin.sru.client.SRURecordData;
+import eu.clarin.sru.client.SRUSurrogateRecordData;
+import eu.clarin.sru.client.SRUWhereInList;
+
+
+public class FCSTestHandler extends SRUDefaultHandlerAdapter {
+    public static class Record {
+        private final String identifier;
+        private final int position;
+        private final SRURecordData data;
+
+
+        public Record(String identifier, int position, SRURecordData data) {
+            this.identifier = identifier;
+            this.position = position;
+            this.data = data;
+        }
+
+
+        public String getIdentifier() {
+            return identifier;
+        }
+
+
+        public int getPosition() {
+            return position;
+        }
+
+
+        public SRURecordData getData() {
+            return data;
+        }
+    }
+
+    public static class SurrogateDiagnostic implements SRURecordData {
+        private final SRUDiagnostic diagnostic;
+
+
+        public SurrogateDiagnostic(SRUDiagnostic diagnostic) {
+            this.diagnostic = diagnostic;
+        }
+
+
+        @Override
+        public boolean isTransient() {
+            return false;
+        }
+
+
+        @Override
+        public String getRecordSchema() {
+            return SRUSurrogateRecordData.RECORD_SCHEMA;
+        }
+
+
+        public SRUDiagnostic getDiagnostic() {
+            return diagnostic;
+        }
+
+
+        public boolean isDiagnostic(String uri) {
+            if (uri == null) {
+                throw new NullPointerException("uri == null");
+            }
+            return uri.equals(diagnostic.getURI());
+        }
+    }
+
+    private List<String> termList = new ArrayList<String>();
+    private List<Record> recordList = new ArrayList<Record>(512);
+    private List<SRUDiagnostic> diagnostics;
+
+
+    @Override
+    public void onDiagnostics(List<SRUDiagnostic> diagnostics)
+            throws SRUClientException {
+        if (this.diagnostics == null) {
+            this.diagnostics = diagnostics;
+        } else {
+            this.diagnostics.addAll(diagnostics);
+        }
+    }
+
+
+    @Override
+    public void onTerm(String value, int numberOfRecords, String displayTerm,
+            SRUWhereInList whereInList) throws SRUClientException {
+        termList.add(value);
+    }
+
+
+    @Override
+    public void onRecord(String identifier, int position, SRURecordData data)
+            throws SRUClientException {
+        recordList.add(new Record(identifier, position, data));
+    }
+
+
+    @Override
+    public void onSurrogateRecord(String identifier, int position,
+            SRUDiagnostic data) throws SRUClientException {
+        recordList.add(new Record(identifier, position,
+                new SurrogateDiagnostic(data)));
+    }
+
+
+    void reset() {
+        termList.clear();
+        recordList.clear();
+        this.diagnostics = null;
+    }
+
+
+    public boolean findDiagnostic(String uri) {
+        if (uri == null) {
+            throw new NullPointerException("uri == null");
+        }
+        if (diagnostics != null) {
+            for (SRUDiagnostic diagnostic : diagnostics) {
+                if (uri.equals(diagnostic.getURI())) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+
+
+    public int getDiagnosticCount() {
+        return diagnostics != null ? diagnostics.size() : 0;
+    }
+
+
+    public List<String> getTerms() {
+        return termList;
+    }
+
+
+    public int getRecordCount() {
+        return recordList.size();
+    }
+
+
+    public List<Record> getRecords() {
+        return recordList;
+    }
+
+} // class SRUTestHandler
Index: /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/FCSTestProfile.java
===================================================================
--- /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/FCSTestProfile.java	(revision 7180)
+++ /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/FCSTestProfile.java	(revision 7180)
@@ -0,0 +1,43 @@
+/**
+ * This software is copyright (c) 2013-2016 by
+ *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ * This is free software. You can redistribute it
+ * and/or modify it under the terms described in
+ * the GNU General Public License v3 of which you
+ * should have received a copy. Otherwise you can download
+ * it from
+ *
+ *   http://www.gnu.org/licenses/gpl-3.0.txt
+ *
+ * @copyright Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ *
+ * @license http://www.gnu.org/licenses/gpl-3.0.txt
+ *  GNU General Public License v3
+ */
+package eu.clarin.fcs.tester;
+
+public enum FCSTestProfile {
+    CLARIN_FCS_1_0(0), CLARIN_FCS_2_0(1), CLARIN_FCS_LEGACY(2);
+
+    final int id;
+
+
+    private FCSTestProfile(final int id) {
+        this.id = id;
+    }
+
+
+    public String toDisplayString() {
+        switch (this) {
+        case CLARIN_FCS_1_0:
+            return "CLARIN FCS 1.0";
+        case CLARIN_FCS_2_0:
+            return "CLARIN FCS 2.0";
+        case CLARIN_FCS_LEGACY:
+            return "Legacy FCS";
+        default:
+            return "";
+        }
+    }
+
+} // enum FCSTestProfile
Index: /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/FCSTestResult.java
===================================================================
--- /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/FCSTestResult.java	(revision 7180)
+++ /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/FCSTestResult.java	(revision 7180)
@@ -0,0 +1,87 @@
+/**
+ * This software is copyright (c) 2013 by
+ *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ * This is free software. You can redistribute it
+ * and/or modify it under the terms described in
+ * the GNU General Public License v3 of which you
+ * should have received a copy. Otherwise you can download
+ * it from
+ *
+ *   http://www.gnu.org/licenses/gpl-3.0.txt
+ *
+ * @copyright Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ *
+ * @license http://www.gnu.org/licenses/gpl-3.0.txt
+ *  GNU General Public License v3
+ */
+package eu.clarin.fcs.tester;
+
+import java.util.List;
+import java.util.logging.LogRecord;
+
+
+public class FCSTestResult {
+    public static enum Code {
+        SUCCESS, WARNING, ERROR
+    }
+
+    private final FCSTest testCase;
+    private final Code code;
+    private final String message;
+    private List<LogRecord> records;
+
+
+    public FCSTestResult(FCSTest testCase, Code code, String message,
+            List<LogRecord> records) {
+        this.testCase = testCase;
+        this.code = code;
+        this.message = message;
+        this.records = records;
+    }
+
+
+    public FCSTestResult(FCSTest testCase, Code code, String message) {
+        this(testCase, code, message, null);
+    }
+
+
+    public FCSTestResult(FCSTest testCase, Code code) {
+        this(testCase, code, null, null);
+    }
+
+
+    public void setLogRecords(List<LogRecord> records) {
+        this.records = records;
+    }
+
+
+    public Code getCode() {
+        return code;
+    }
+
+
+    public List<LogRecord> getLogRecords() {
+        return records;
+    }
+
+
+    public String getTestCaseName() {
+        return testCase.getName();
+    }
+
+
+    public String getTestCaseDescription() {
+        return testCase.getDescription();
+    }
+
+
+    public String getActualResultMessage() {
+        return message;
+    }
+
+
+    public String getExpectedResultMessage() {
+        return testCase.getExpected();
+    }
+
+} // class SRUTestResult
Index: /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestExplain1.java
===================================================================
--- /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestExplain1.java	(revision 7180)
+++ /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestExplain1.java	(revision 7180)
@@ -0,0 +1,63 @@
+/**
+ * This software is copyright (c) 2013 by
+ *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ * This is free software. You can redistribute it
+ * and/or modify it under the terms described in
+ * the GNU General Public License v3 of which you
+ * should have received a copy. Otherwise you can download
+ * it from
+ *
+ *   http://www.gnu.org/licenses/gpl-3.0.txt
+ *
+ * @copyright Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ *
+ * @license http://www.gnu.org/licenses/gpl-3.0.txt
+ *  GNU General Public License v3
+ */
+package eu.clarin.fcs.tester.tests;
+
+import eu.clarin.fcs.tester.FCSTest;
+import eu.clarin.fcs.tester.FCSTestCase;
+import eu.clarin.fcs.tester.FCSTestContext;
+import eu.clarin.fcs.tester.FCSTestProfile;
+import eu.clarin.fcs.tester.FCSTestHandler;
+import eu.clarin.fcs.tester.FCSTestResult;
+import eu.clarin.sru.client.SRUClientException;
+import eu.clarin.sru.client.SRUExplainRequest;
+import eu.clarin.sru.client.SRUSimpleClient;
+
+
+@FCSTestCase(priority = 1000, profiles = {
+        FCSTestProfile.CLARIN_FCS_1_0,
+        FCSTestProfile.CLARIN_FCS_2_0,
+        FCSTestProfile.CLARIN_FCS_LEGACY
+})
+public class TestExplain1 extends FCSTest {
+    @Override
+    public String getName() {
+        return "Explain";
+    }
+
+
+    @Override
+    public String getDescription() {
+        return "Regular explain request using default version";
+    }
+
+
+    @Override
+    public String getExpected() {
+        return "No errors or diagnostics";
+    }
+
+
+    @Override
+    public FCSTestResult perform(FCSTestContext context, SRUSimpleClient client,
+            FCSTestHandler handler) throws SRUClientException {
+        SRUExplainRequest req = context.createExplainRequest();
+        client.explain(req, handler);
+        return handler.getDiagnosticCount() == 0 ? makeSuccess()
+                : makeWarningUnexpectedDiagnostics();
+    }
+
+}
Index: /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestExplain2.java
===================================================================
--- /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestExplain2.java	(revision 7180)
+++ /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestExplain2.java	(revision 7180)
@@ -0,0 +1,66 @@
+/**
+ * This software is copyright (c) 2013 by
+ *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ * This is free software. You can redistribute it
+ * and/or modify it under the terms described in
+ * the GNU General Public License v3 of which you
+ * should have received a copy. Otherwise you can download
+ * it from
+ *
+ *   http://www.gnu.org/licenses/gpl-3.0.txt
+ *
+ * @copyright Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ *
+ * @license http://www.gnu.org/licenses/gpl-3.0.txt
+ *  GNU General Public License v3
+ */
+package eu.clarin.fcs.tester.tests;
+
+import eu.clarin.fcs.tester.FCSTest;
+import eu.clarin.fcs.tester.FCSTestCase;
+import eu.clarin.fcs.tester.FCSTestContext;
+import eu.clarin.fcs.tester.FCSTestProfile;
+import eu.clarin.fcs.tester.FCSTestHandler;
+import eu.clarin.fcs.tester.FCSTestResult;
+import eu.clarin.sru.client.SRUClientException;
+import eu.clarin.sru.client.SRUExplainRequest;
+import eu.clarin.sru.client.SRUSimpleClient;
+
+
+@FCSTestCase(priority = 1010, profiles = {
+        FCSTestProfile.CLARIN_FCS_1_0,
+        FCSTestProfile.CLARIN_FCS_LEGACY
+})
+public class TestExplain2 extends FCSTest {
+
+    @Override
+    public String getName() {
+        return "Explain";
+    }
+
+
+    @Override
+    public String getDescription() {
+        return "Explain without 'operation' and 'version' arguments";
+    }
+
+
+    @Override
+    public String getExpected() {
+        return "An plain explain response with SRU version choosen by server";
+    }
+
+
+    @Override
+    public FCSTestResult perform(FCSTestContext context, SRUSimpleClient client,
+            FCSTestHandler handler) throws SRUClientException {
+        SRUExplainRequest req = context.createExplainRequest();
+        req.setExtraRequestData(SRUExplainRequest.X_MALFORMED_OPERATION,
+                SRUExplainRequest.MALFORMED_OMIT);
+        req.setExtraRequestData(SRUExplainRequest.X_MALFORMED_VERSION,
+                SRUExplainRequest.MALFORMED_OMIT);
+        client.explain(req, handler);
+        return makeSuccess();
+    }
+
+}
Index: /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestExplain3.java
===================================================================
--- /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestExplain3.java	(revision 7180)
+++ /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestExplain3.java	(revision 7180)
@@ -0,0 +1,63 @@
+/**
+ * This software is copyright (c) 2013 by
+ *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ * This is free software. You can redistribute it
+ * and/or modify it under the terms described in
+ * the GNU General Public License v3 of which you
+ * should have received a copy. Otherwise you can download
+ * it from
+ *
+ *   http://www.gnu.org/licenses/gpl-3.0.txt
+ *
+ * @copyright Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ *
+ * @license http://www.gnu.org/licenses/gpl-3.0.txt
+ *  GNU General Public License v3
+ */
+package eu.clarin.fcs.tester.tests;
+
+import eu.clarin.fcs.tester.FCSTest;
+import eu.clarin.fcs.tester.FCSTestCase;
+import eu.clarin.fcs.tester.FCSTestContext;
+import eu.clarin.fcs.tester.FCSTestProfile;
+import eu.clarin.fcs.tester.FCSTestHandler;
+import eu.clarin.fcs.tester.FCSTestResult;
+import eu.clarin.sru.client.SRUClientException;
+import eu.clarin.sru.client.SRUExplainRequest;
+import eu.clarin.sru.client.SRUSimpleClient;
+
+@FCSTestCase(priority=1020, profiles = {
+        FCSTestProfile.CLARIN_FCS_1_0,
+        FCSTestProfile.CLARIN_FCS_LEGACY
+})
+public class TestExplain3 extends FCSTest {
+
+    @Override
+    public String getName() {
+        return "Explain";
+    }
+
+
+    @Override
+    public String getDescription() {
+        return "Explain without 'version' argument";
+    }
+
+
+    @Override
+    public String getExpected() {
+        return "An plain explain response with SRU version choosen by server";
+    }
+
+
+    @Override
+    public FCSTestResult perform(FCSTestContext context, SRUSimpleClient client,
+            FCSTestHandler handler) throws SRUClientException {
+        SRUExplainRequest req = context.createExplainRequest();
+        req.setExtraRequestData(SRUExplainRequest.X_MALFORMED_VERSION,
+                SRUExplainRequest.MALFORMED_OMIT);
+        client.explain(req, handler);
+        return makeSuccess();
+    }
+
+}
Index: /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestExplain4.java
===================================================================
--- /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestExplain4.java	(revision 7180)
+++ /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestExplain4.java	(revision 7180)
@@ -0,0 +1,63 @@
+/**
+ * This software is copyright (c) 2013 by
+ *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ * This is free software. You can redistribute it
+ * and/or modify it under the terms described in
+ * the GNU General Public License v3 of which you
+ * should have received a copy. Otherwise you can download
+ * it from
+ *
+ *   http://www.gnu.org/licenses/gpl-3.0.txt
+ *
+ * @copyright Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ *
+ * @license http://www.gnu.org/licenses/gpl-3.0.txt
+ *  GNU General Public License v3
+ */
+package eu.clarin.fcs.tester.tests;
+
+import eu.clarin.fcs.tester.FCSTest;
+import eu.clarin.fcs.tester.FCSTestCase;
+import eu.clarin.fcs.tester.FCSTestContext;
+import eu.clarin.fcs.tester.FCSTestProfile;
+import eu.clarin.fcs.tester.FCSTestHandler;
+import eu.clarin.fcs.tester.FCSTestResult;
+import eu.clarin.sru.client.SRUClientException;
+import eu.clarin.sru.client.SRUExplainRequest;
+import eu.clarin.sru.client.SRUSimpleClient;
+
+@FCSTestCase(priority=1040, profiles = {
+        FCSTestProfile.CLARIN_FCS_1_0,
+        FCSTestProfile.CLARIN_FCS_LEGACY
+})
+public class TestExplain4 extends FCSTest {
+
+    @Override
+    public String getName() {
+        return "Explain";
+    }
+
+
+    @Override
+    public String getDescription() {
+        return "Explain without 'operation' argument";
+    }
+
+
+    @Override
+    public String getExpected() {
+        return "An plain explain response with SRU version argument";
+    }
+
+
+    @Override
+    public FCSTestResult perform(FCSTestContext context, SRUSimpleClient client,
+            FCSTestHandler handler) throws SRUClientException {
+        SRUExplainRequest req = context.createExplainRequest();
+        req.setExtraRequestData(SRUExplainRequest.X_MALFORMED_OPERATION,
+                SRUExplainRequest.MALFORMED_OMIT);
+        client.explain(req, handler);
+        return makeSuccess();
+    }
+
+}
Index: /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestExplain5.java
===================================================================
--- /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestExplain5.java	(revision 7180)
+++ /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestExplain5.java	(revision 7180)
@@ -0,0 +1,65 @@
+/**
+ * This software is copyright (c) 2013 by
+ *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ * This is free software. You can redistribute it
+ * and/or modify it under the terms described in
+ * the GNU General Public License v3 of which you
+ * should have received a copy. Otherwise you can download
+ * it from
+ *
+ *   http://www.gnu.org/licenses/gpl-3.0.txt
+ *
+ * @copyright Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ *
+ * @license http://www.gnu.org/licenses/gpl-3.0.txt
+ *  GNU General Public License v3
+ */
+package eu.clarin.fcs.tester.tests;
+
+import eu.clarin.fcs.tester.FCSTest;
+import eu.clarin.fcs.tester.FCSTestCase;
+import eu.clarin.fcs.tester.FCSTestContext;
+import eu.clarin.fcs.tester.FCSTestProfile;
+import eu.clarin.fcs.tester.FCSTestHandler;
+import eu.clarin.fcs.tester.FCSTestResult;
+import eu.clarin.sru.client.SRUClientException;
+import eu.clarin.sru.client.SRUExplainRequest;
+import eu.clarin.sru.client.SRUSimpleClient;
+
+@FCSTestCase(priority=1050, profiles = {
+        FCSTestProfile.CLARIN_FCS_1_0,
+        FCSTestProfile.CLARIN_FCS_LEGACY
+})
+public class TestExplain5 extends FCSTest {
+
+    @Override
+    public String getName() {
+        return "Explain";
+    }
+
+
+    @Override
+    public String getDescription() {
+        return "Explain with invalid value for 'version' argument";
+    }
+
+
+    @Override
+    public String getExpected() {
+        return "Expecting diagnostic \"info:srw/diagnostic/1/5\"";
+    }
+
+
+    @Override
+    public FCSTestResult perform(FCSTestContext context, SRUSimpleClient client,
+            FCSTestHandler handler) throws SRUClientException {
+        SRUExplainRequest req = context.createExplainRequest();
+        req.setExtraRequestData(SRUExplainRequest.X_MALFORMED_VERSION,
+                "9.9");
+        client.explain(req, handler);
+        return handler.findDiagnostic("info:srw/diagnostic/1/5")
+                ? makeSuccess()
+                : makeErrorNoDiagnostic("info:srw/diagnostic/1/5");
+    }
+
+}
Index: /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestScan1.java
===================================================================
--- /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestScan1.java	(revision 7180)
+++ /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestScan1.java	(revision 7180)
@@ -0,0 +1,64 @@
+/**
+ * This software is copyright (c) 2013 by
+ *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ * This is free software. You can redistribute it
+ * and/or modify it under the terms described in
+ * the GNU General Public License v3 of which you
+ * should have received a copy. Otherwise you can download
+ * it from
+ *
+ *   http://www.gnu.org/licenses/gpl-3.0.txt
+ *
+ * @copyright Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ *
+ * @license http://www.gnu.org/licenses/gpl-3.0.txt
+ *  GNU General Public License v3
+ */
+package eu.clarin.fcs.tester.tests;
+
+import eu.clarin.fcs.tester.FCSTest;
+import eu.clarin.fcs.tester.FCSTestCase;
+import eu.clarin.fcs.tester.FCSTestContext;
+import eu.clarin.fcs.tester.FCSTestProfile;
+import eu.clarin.fcs.tester.FCSTestHandler;
+import eu.clarin.fcs.tester.FCSTestResult;
+import eu.clarin.sru.client.SRUClientException;
+import eu.clarin.sru.client.SRUScanRequest;
+import eu.clarin.sru.client.SRUSimpleClient;
+
+@FCSTestCase(priority=2000, profiles = {
+        FCSTestProfile.CLARIN_FCS_LEGACY
+})
+public class TestScan1 extends FCSTest {
+
+    @Override
+    public String getName() {
+        return "Scan";
+    }
+
+
+    @Override
+    public String getDescription() {
+        return "Scan with missing 'scanClause' argument";
+    }
+
+
+    @Override
+    public String getExpected() {
+        return "Expecting diagnostic \"info:srw/diagnostic/1/7\"";
+    }
+
+
+    @Override
+    public FCSTestResult perform(FCSTestContext context, SRUSimpleClient client,
+            FCSTestHandler handler) throws SRUClientException {
+        SRUScanRequest req = context.createScanRequest();
+        req.setExtraRequestData(SRUScanRequest.X_MALFORMED_SCAN_CLAUSE,
+                SRUScanRequest.MALFORMED_OMIT);
+        client.scan(req, handler);
+        return handler.findDiagnostic("info:srw/diagnostic/1/7")
+                ? makeSuccess()
+                : makeErrorNoDiagnostic("info:srw/diagnostic/1/7");
+    }
+
+}
Index: /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestScan2.java
===================================================================
--- /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestScan2.java	(revision 7180)
+++ /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestScan2.java	(revision 7180)
@@ -0,0 +1,77 @@
+/**
+ * This software is copyright (c) 2013 by
+ *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ * This is free software. You can redistribute it
+ * and/or modify it under the terms described in
+ * the GNU General Public License v3 of which you
+ * should have received a copy. Otherwise you can download
+ * it from
+ *
+ *   http://www.gnu.org/licenses/gpl-3.0.txt
+ *
+ * @copyright Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ *
+ * @license http://www.gnu.org/licenses/gpl-3.0.txt
+ *  GNU General Public License v3
+ */
+package eu.clarin.fcs.tester.tests;
+
+import java.util.List;
+
+import eu.clarin.fcs.tester.FCSTest;
+import eu.clarin.fcs.tester.FCSTestCase;
+import eu.clarin.fcs.tester.FCSTestContext;
+import eu.clarin.fcs.tester.FCSTestProfile;
+import eu.clarin.fcs.tester.FCSTestHandler;
+import eu.clarin.fcs.tester.FCSTestResult;
+import eu.clarin.sru.client.SRUClientException;
+import eu.clarin.sru.client.SRUScanRequest;
+import eu.clarin.sru.client.SRUSimpleClient;
+
+@FCSTestCase(priority=2010, profiles = {
+        FCSTestProfile.CLARIN_FCS_LEGACY
+})
+public class TestScan2 extends FCSTest {
+
+    @Override
+    public String getName() {
+        return "Scan";
+    }
+
+
+    @Override
+    public String getDescription() {
+        return "Scan on 'fcs.resource = root'";
+    }
+
+
+    @Override
+    public String getExpected() {
+        return "One or more terms returned within scan response";
+    }
+
+
+    @Override
+    public FCSTestResult perform(FCSTestContext context, SRUSimpleClient client,
+            FCSTestHandler handler) throws SRUClientException {
+        SRUScanRequest req = context.createScanRequest();
+        req.setScanClause("fcs.resource=root");
+        client.scan(req, handler);
+
+        if (handler.findDiagnostic("info:srw/diagnostic/1/4")) {
+            return makeWarning("Endpoint does not support 'scan' operation");
+        } else {
+            if (handler.getDiagnosticCount() == 0) {
+                List<String> terms = handler.getTerms();
+                if (terms.size() >= 1) {
+                    return makeSuccess();
+                } else {
+                    return makeWarning("Scan on 'fcs.resource = root' should yield at least one collection");
+                }
+            } else {
+                return makeWarningUnexpectedDiagnostics();
+            }
+        }
+    }
+
+}
Index: /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestScan3.java
===================================================================
--- /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestScan3.java	(revision 7180)
+++ /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestScan3.java	(revision 7180)
@@ -0,0 +1,79 @@
+/**
+ * This software is copyright (c) 2013 by
+ *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ * This is free software. You can redistribute it
+ * and/or modify it under the terms described in
+ * the GNU General Public License v3 of which you
+ * should have received a copy. Otherwise you can download
+ * it from
+ *
+ *   http://www.gnu.org/licenses/gpl-3.0.txt
+ *
+ * @copyright Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ *
+ * @license http://www.gnu.org/licenses/gpl-3.0.txt
+ *  GNU General Public License v3
+ */
+package eu.clarin.fcs.tester.tests;
+
+import java.util.List;
+
+import eu.clarin.fcs.tester.FCSTest;
+import eu.clarin.fcs.tester.FCSTestCase;
+import eu.clarin.fcs.tester.FCSTestContext;
+import eu.clarin.fcs.tester.FCSTestProfile;
+import eu.clarin.fcs.tester.FCSTestHandler;
+import eu.clarin.fcs.tester.FCSTestResult;
+import eu.clarin.sru.client.SRUClientException;
+import eu.clarin.sru.client.SRUScanRequest;
+import eu.clarin.sru.client.SRUSimpleClient;
+
+@FCSTestCase(priority=2030, profiles = {
+        FCSTestProfile.CLARIN_FCS_LEGACY
+})
+public class TestScan3 extends FCSTest {
+
+    @Override
+    public String getName() {
+        return "Scan";
+    }
+
+
+    @Override
+    public String getDescription() {
+        return "Scan on 'fcs.resource = root' with 'maximumTerms' with value 1";
+    }
+
+
+    @Override
+    public String getExpected() {
+        return "Exactly one term returned within scan response";
+    }
+
+
+    @Override
+    public FCSTestResult perform(FCSTestContext context, SRUSimpleClient client,
+            FCSTestHandler handler) throws SRUClientException {
+        SRUScanRequest req = context.createScanRequest();
+        req.setScanClause("fcs.resource=root");
+        req.setMaximumTerms(1);
+        client.scan(req, handler);
+
+        if (handler.getDiagnosticCount() > 0) {
+            if (handler.findDiagnostic("info:srw/diagnostic/1/4")) {
+                return makeWarning("Endpoint does not support 'scan' operation");
+            } else {
+                return makeWarningUnexpectedDiagnostics();
+            }
+        } else {
+            List<String> terms = handler.getTerms();
+            if (terms.size() == 1) {
+                return makeSuccess();
+            } else if (terms.size() > 1) {
+                return makeWarning("Endpoint did not honor 'maximumTerms' argument");
+            }
+        }
+        return makeGenericError();
+    }
+
+}
Index: /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestScan4.java
===================================================================
--- /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestScan4.java	(revision 7180)
+++ /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestScan4.java	(revision 7180)
@@ -0,0 +1,67 @@
+/**
+ * This software is copyright (c) 2013 by
+ *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ * This is free software. You can redistribute it
+ * and/or modify it under the terms described in
+ * the GNU General Public License v3 of which you
+ * should have received a copy. Otherwise you can download
+ * it from
+ *
+ *   http://www.gnu.org/licenses/gpl-3.0.txt
+ *
+ * @copyright Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ *
+ * @license http://www.gnu.org/licenses/gpl-3.0.txt
+ *  GNU General Public License v3
+ */
+package eu.clarin.fcs.tester.tests;
+
+import eu.clarin.fcs.tester.FCSTest;
+import eu.clarin.fcs.tester.FCSTestCase;
+import eu.clarin.fcs.tester.FCSTestContext;
+import eu.clarin.fcs.tester.FCSTestProfile;
+import eu.clarin.fcs.tester.FCSTestHandler;
+import eu.clarin.fcs.tester.FCSTestResult;
+import eu.clarin.sru.client.SRUClientException;
+import eu.clarin.sru.client.SRUScanRequest;
+import eu.clarin.sru.client.SRUSimpleClient;
+
+@FCSTestCase(priority=2040, profiles = {
+        FCSTestProfile.CLARIN_FCS_1_0,
+        FCSTestProfile.CLARIN_FCS_2_0,
+        FCSTestProfile.CLARIN_FCS_LEGACY
+})
+public class TestScan4 extends FCSTest {
+
+    @Override
+    public String getName() {
+        return "Scan";
+    }
+
+
+    @Override
+    public String getDescription() {
+        return "Scan on 'fcs.resource = root' with bad 'maximumTerms' argument";
+    }
+
+
+    @Override
+    public String getExpected() {
+        return "Expecting diagnostic \"info:srw/diagnostic/1/6\"";
+    }
+
+
+    @Override
+    public FCSTestResult perform(FCSTestContext context, SRUSimpleClient client,
+            FCSTestHandler handler) throws SRUClientException {
+        SRUScanRequest req = context.createScanRequest();
+        req.setScanClause("fcs.resource=root");
+        req.setExtraRequestData(SRUScanRequest.X_MALFORMED_MAXIMUM_TERMS,
+                "invalid");
+        client.scan(req, handler);
+        return handler.findDiagnostic("info:srw/diagnostic/1/6")
+                ? makeSuccess()
+                : makeErrorNoDiagnostic("info:srw/diagnostic/1/6");
+    }
+
+}
Index: /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestScan5.java
===================================================================
--- /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestScan5.java	(revision 7180)
+++ /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestScan5.java	(revision 7180)
@@ -0,0 +1,67 @@
+/**
+ * This software is copyright (c) 2013 by
+ *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ * This is free software. You can redistribute it
+ * and/or modify it under the terms described in
+ * the GNU General Public License v3 of which you
+ * should have received a copy. Otherwise you can download
+ * it from
+ *
+ *   http://www.gnu.org/licenses/gpl-3.0.txt
+ *
+ * @copyright Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ *
+ * @license http://www.gnu.org/licenses/gpl-3.0.txt
+ *  GNU General Public License v3
+ */
+package eu.clarin.fcs.tester.tests;
+
+import eu.clarin.fcs.tester.FCSTest;
+import eu.clarin.fcs.tester.FCSTestCase;
+import eu.clarin.fcs.tester.FCSTestContext;
+import eu.clarin.fcs.tester.FCSTestProfile;
+import eu.clarin.fcs.tester.FCSTestHandler;
+import eu.clarin.fcs.tester.FCSTestResult;
+import eu.clarin.sru.client.SRUClientException;
+import eu.clarin.sru.client.SRUScanRequest;
+import eu.clarin.sru.client.SRUSimpleClient;
+
+@FCSTestCase(priority=2050, profiles = {
+        FCSTestProfile.CLARIN_FCS_1_0,
+        FCSTestProfile.CLARIN_FCS_2_0,
+        FCSTestProfile.CLARIN_FCS_LEGACY
+})
+public class TestScan5 extends FCSTest {
+
+    @Override
+    public String getName() {
+        return "Scan";
+    }
+
+
+    @Override
+    public String getDescription() {
+        return "Scan on 'fcs.resource = root' with bad 'responsePosition' argument";
+    }
+
+
+    @Override
+    public String getExpected() {
+        return "Expecting diagnostic \"info:srw/diagnostic/1/6\"";
+    }
+
+
+    @Override
+    public FCSTestResult perform(FCSTestContext context, SRUSimpleClient client,
+            FCSTestHandler handler) throws SRUClientException {
+        SRUScanRequest req = context.createScanRequest();
+        req.setScanClause("fcs.resource=root");
+        req.setExtraRequestData(SRUScanRequest.X_MALFORMED_RESPONSE_POSITION,
+                "invalid");
+        client.scan(req, handler);
+        return handler.findDiagnostic("info:srw/diagnostic/1/6")
+                ? makeSuccess()
+                : makeErrorNoDiagnostic("info:srw/diagnostic/1/6");
+    }
+
+}
Index: /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestSearch1.java
===================================================================
--- /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestSearch1.java	(revision 7180)
+++ /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestSearch1.java	(revision 7180)
@@ -0,0 +1,67 @@
+/**
+ * This software is copyright (c) 2013 by
+ *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ * This is free software. You can redistribute it
+ * and/or modify it under the terms described in
+ * the GNU General Public License v3 of which you
+ * should have received a copy. Otherwise you can download
+ * it from
+ *
+ *   http://www.gnu.org/licenses/gpl-3.0.txt
+ *
+ * @copyright Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ *
+ * @license http://www.gnu.org/licenses/gpl-3.0.txt
+ *  GNU General Public License v3
+ */
+package eu.clarin.fcs.tester.tests;
+
+import eu.clarin.fcs.tester.FCSTest;
+import eu.clarin.fcs.tester.FCSTestCase;
+import eu.clarin.fcs.tester.FCSTestContext;
+import eu.clarin.fcs.tester.FCSTestProfile;
+import eu.clarin.fcs.tester.FCSTestHandler;
+import eu.clarin.fcs.tester.FCSTestResult;
+import eu.clarin.sru.client.SRUClientConstants;
+import eu.clarin.sru.client.SRUClientException;
+import eu.clarin.sru.client.SRUSearchRetrieveRequest;
+import eu.clarin.sru.client.SRUSimpleClient;
+
+@FCSTestCase(priority=3000, profiles = {
+        FCSTestProfile.CLARIN_FCS_1_0,
+        FCSTestProfile.CLARIN_FCS_2_0,
+        FCSTestProfile.CLARIN_FCS_LEGACY
+})
+public class TestSearch1 extends FCSTest {
+
+    @Override
+    public String getName() {
+        return "SearchRetrieve";
+    }
+
+
+    @Override
+    public String getDescription() {
+        return "Search for random string";
+    }
+
+
+    @Override
+    public String getExpected() {
+        return "No errors or diagnostics (and zero or more records)";
+    }
+
+
+    @Override
+    public FCSTestResult perform(FCSTestContext context, SRUSimpleClient client,
+            FCSTestHandler handler) throws SRUClientException {
+        SRUSearchRetrieveRequest req = context.createSearchRetrieveRequest();
+        req.setQuery(SRUClientConstants.QUERY_TYPE_CQL,
+                escapeCQL(context.getRandomSearchTerm()));
+        client.searchRetrieve(req, handler);
+        return handler.getDiagnosticCount() == 0
+                ? makeSuccess()
+                : makeWarningUnexpectedDiagnostics();
+    }
+
+}
Index: /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestSearch10.java
===================================================================
--- /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestSearch10.java	(revision 7180)
+++ /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestSearch10.java	(revision 7180)
@@ -0,0 +1,68 @@
+/**
+ * This software is copyright (c) 2013 by
+ *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ * This is free software. You can redistribute it
+ * and/or modify it under the terms described in
+ * the GNU General Public License v3 of which you
+ * should have received a copy. Otherwise you can download
+ * it from
+ *
+ *   http://www.gnu.org/licenses/gpl-3.0.txt
+ *
+ * @copyright Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ *
+ * @license http://www.gnu.org/licenses/gpl-3.0.txt
+ *  GNU General Public License v3
+ */
+package eu.clarin.fcs.tester.tests;
+
+import eu.clarin.fcs.tester.FCSTest;
+import eu.clarin.fcs.tester.FCSTestCase;
+import eu.clarin.fcs.tester.FCSTestContext;
+import eu.clarin.fcs.tester.FCSTestProfile;
+import eu.clarin.fcs.tester.FCSTestHandler;
+import eu.clarin.fcs.tester.FCSTestResult;
+import eu.clarin.sru.client.SRUClientConstants;
+import eu.clarin.sru.client.SRUClientException;
+import eu.clarin.sru.client.SRUSearchRetrieveRequest;
+import eu.clarin.sru.client.SRUSimpleClient;
+
+@FCSTestCase(priority=3100, profiles = {
+        FCSTestProfile.CLARIN_FCS_1_0,
+        FCSTestProfile.CLARIN_FCS_2_0,
+        FCSTestProfile.CLARIN_FCS_LEGACY
+})
+public class TestSearch10 extends FCSTest {
+
+    @Override
+    public String getName() {
+        return "SearchRetrieve";
+    }
+
+
+    @Override
+    public String getDescription() {
+        return "Search to provoke first record position out of range diagnostic";
+    }
+
+
+    @Override
+    public String getExpected() {
+        return "Expecting diagnostic \"info:srw/diagnostic/1/61\"";
+    }
+
+
+    @Override
+    public FCSTestResult perform(FCSTestContext context, SRUSimpleClient client,
+            FCSTestHandler handler) throws SRUClientException {
+        SRUSearchRetrieveRequest req = context.createSearchRetrieveRequest();
+        req.setQuery(SRUClientConstants.QUERY_TYPE_CQL,
+                escapeCQL(context.getRandomSearchTerm()));
+        req.setStartRecord(Integer.MAX_VALUE);
+        client.searchRetrieve(req, handler);
+        return handler.findDiagnostic("info:srw/diagnostic/1/61")
+                ? makeSuccess()
+                : makeErrorNoDiagnostic("info:srw/diagnostic/1/61");
+    }
+
+}
Index: /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestSearch11.java
===================================================================
--- /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestSearch11.java	(revision 7180)
+++ /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestSearch11.java	(revision 7180)
@@ -0,0 +1,67 @@
+/**
+ * This software is copyright (c) 2013 by
+ *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ * This is free software. You can redistribute it
+ * and/or modify it under the terms described in
+ * the GNU General Public License v3 of which you
+ * should have received a copy. Otherwise you can download
+ * it from
+ *
+ *   http://www.gnu.org/licenses/gpl-3.0.txt
+ *
+ * @copyright Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ *
+ * @license http://www.gnu.org/licenses/gpl-3.0.txt
+ *  GNU General Public License v3
+ */
+package eu.clarin.fcs.tester.tests;
+
+import eu.clarin.fcs.tester.FCSTest;
+import eu.clarin.fcs.tester.FCSTestCase;
+import eu.clarin.fcs.tester.FCSTestContext;
+import eu.clarin.fcs.tester.FCSTestProfile;
+import eu.clarin.fcs.tester.FCSTestHandler;
+import eu.clarin.fcs.tester.FCSTestResult;
+import eu.clarin.sru.client.SRUClientConstants;
+import eu.clarin.sru.client.SRUClientException;
+import eu.clarin.sru.client.SRUSearchRetrieveRequest;
+import eu.clarin.sru.client.SRUSimpleClient;
+
+@FCSTestCase(priority=3200, profiles = {
+        FCSTestProfile.CLARIN_FCS_1_0,
+        FCSTestProfile.CLARIN_FCS_2_0,
+        FCSTestProfile.CLARIN_FCS_LEGACY
+})
+public class TestSearch11 extends FCSTest {
+
+    @Override
+    public String getName() {
+        return "SearchRetrieve";
+    }
+
+
+    @Override
+    public String getDescription() {
+        return "Search for string with non-ASCII characters encoded as UTF-8";
+    }
+
+
+    @Override
+    public String getExpected() {
+        return "No errors or diagnostics (and zero or more records)";
+    }
+
+
+    @Override
+    public FCSTestResult perform(FCSTestContext context, SRUSimpleClient client,
+            FCSTestHandler handler) throws SRUClientException {
+        SRUSearchRetrieveRequest req = context.createSearchRetrieveRequest();
+        req.setQuery(SRUClientConstants.QUERY_TYPE_CQL,
+                escapeCQL(context.getUnicodeSearchTerm()));
+        client.searchRetrieve(req, handler);
+        return handler.getDiagnosticCount() == 0
+                ? makeSuccess()
+                : makeWarningUnexpectedDiagnostics();
+    }
+
+}
Index: /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestSearch12.java
===================================================================
--- /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestSearch12.java	(revision 7180)
+++ /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestSearch12.java	(revision 7180)
@@ -0,0 +1,158 @@
+/**
+ * This software is copyright (c) 2013 by
+ *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ * This is free software. You can redistribute it
+ * and/or modify it under the terms described in
+ * the GNU General Public License v3 of which you
+ * should have received a copy. Otherwise you can download
+ * it from
+ *
+ *   http://www.gnu.org/licenses/gpl-3.0.txt
+ *
+ * @copyright Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ *
+ * @license http://www.gnu.org/licenses/gpl-3.0.txt
+ *  GNU General Public License v3
+ */
+package eu.clarin.fcs.tester.tests;
+
+import eu.clarin.fcs.tester.FCSTest;
+import eu.clarin.fcs.tester.FCSTestCase;
+import eu.clarin.fcs.tester.FCSTestContext;
+import eu.clarin.fcs.tester.FCSTestProfile;
+import eu.clarin.fcs.tester.FCSTestHandler;
+import eu.clarin.fcs.tester.FCSTestHandler.SurrogateDiagnostic;
+import eu.clarin.fcs.tester.FCSTestResult;
+import eu.clarin.sru.client.SRUClientConstants;
+import eu.clarin.sru.client.SRUClientException;
+import eu.clarin.sru.client.SRUDiagnostic;
+import eu.clarin.sru.client.SRUSearchRetrieveRequest;
+import eu.clarin.sru.client.SRUSimpleClient;
+import eu.clarin.sru.client.SRUSurrogateRecordData;
+import eu.clarin.sru.client.fcs.DataView;
+import eu.clarin.sru.client.fcs.LegacyClarinFCSRecordData;
+import eu.clarin.sru.client.fcs.Resource;
+import eu.clarin.sru.client.fcs.Resource.ResourceFragment;
+
+@FCSTestCase(priority=3600, profiles = {
+        FCSTestProfile.CLARIN_FCS_LEGACY
+})
+@SuppressWarnings("deprecation")
+public class TestSearch12 extends FCSTest {
+    private static final String FCS_RECORD_SCHEMA = "http://clarin.eu/fcs/1.0";
+    private static final String MIME_TYPE_KWIC =
+            "application/x-clarin-fcs-kwic+xml";
+
+
+    @Override
+    public String getName() {
+        return "SearchRetrieve";
+    }
+
+
+    @Override
+    public String getDescription() {
+        return "Search for user specified search term and " +
+                "requesting endpoint to return results in CLARIN-FCS " +
+                "record schema '" + FCS_RECORD_SCHEMA + "'";
+    }
+
+
+    @Override
+    public String getExpected() {
+        return "Expecting at least one record in CLARIN-FCS legacy record " +
+                "schema (without any surrogate diagnostics)";
+    }
+
+
+    @Override
+    public FCSTestResult perform(FCSTestContext context, SRUSimpleClient client,
+            FCSTestHandler handler) throws SRUClientException {
+        SRUSearchRetrieveRequest req = context.createSearchRetrieveRequest();
+        req.setQuery(SRUClientConstants.QUERY_TYPE_CQL,
+                escapeCQL(context.getUserSearchTerm()));
+        req.setRecordSchema(FCS_RECORD_SCHEMA);
+        req.setMaximumRecords(5);
+        client.searchRetrieve(req, handler);
+        if (handler.findDiagnostic("info:srw/diagnostic/1/66")) {
+            return makeError("Endpoint claims to not " +
+                    "support FCS record schema (" + FCS_RECORD_SCHEMA + ")");
+        } else if (handler.getRecordCount() == 0) {
+            return makeWarning("Endpoint has no results " +"" +
+                    "for search term \"" + context.getUserSearchTerm() +
+                    "\". Please supply a different search term.");
+        } else {
+            for (FCSTestHandler.Record record : handler.getRecords()) {
+                String recordSchema = record.getData().getRecordSchema();
+                if (SRUSurrogateRecordData.RECORD_SCHEMA.equals(recordSchema)) {
+                    final SurrogateDiagnostic data =
+                            (SurrogateDiagnostic) record.getData();
+                    final SRUDiagnostic d = data.getDiagnostic();
+
+                    if (data.isDiagnostic("info:srw/diagnostic/1/67")) {
+                        return makeError("Endpoint cannot render record in " +
+                                "CLARIN-FCS record format and returned " +
+                                "surrogate diagnostic \"info:srw/diagnostic/1/67\" " +
+                                "instead.");
+                    } else if (data.isDiagnostic("info:clarin/sru/diagnostic/2")) {
+                        return makeError("Endpoint sent one or more records with record " +
+                                        "schema of '" + d.getDetails() +
+                                        "' instead of '" + FCS_RECORD_SCHEMA +
+                                        "'.");
+                    } else {
+                        StringBuilder sb = new StringBuilder();
+                        sb.append("Endpoint returned unexpected surrgogate ")
+                                .append("diagnostic \"")
+                                .append(d.getURI()).append("\"");
+                        if (d.getDetails() != null) {
+                            sb.append("; details = \"")
+                                .append(d.getDetails()).append("\"");
+                        }
+                        if (d.getMessage() != null) {
+                            sb.append("; message = \"")
+                                .append(d.getMessage()).append("\"");
+                        }
+                        return makeError(sb.toString());
+                    }
+                } else if (FCS_RECORD_SCHEMA.equals(recordSchema)) {
+                    final LegacyClarinFCSRecordData data =
+                            (LegacyClarinFCSRecordData) record.getData();
+                    final Resource resource = data.getResource();
+                    boolean foundKwic = false;
+                    if (resource.hasDataViews()) {
+                        for (DataView dataView : resource.getDataViews()) {
+                            if (dataView.isMimeType(MIME_TYPE_KWIC)) {
+                                foundKwic = true;
+                            }
+                        }
+                    }
+
+                    if (resource.hasResourceFragments()) {
+                        for (ResourceFragment fragment : resource.getResourceFragments()) {
+                            for (DataView dataView : fragment.getDataViews()) {
+                                if (dataView.isMimeType(MIME_TYPE_KWIC)) {
+                                    foundKwic = true;
+                                }
+                            }
+                        }
+                    }
+                    if (!foundKwic) {
+                        return makeError("Endpoint did not provide mandatory KWIC dataview in results");
+                    }
+
+                } else {
+                    return makeError("Endpoint does not supply results in FCS record schema (" + FCS_RECORD_SCHEMA + "\"");
+                }
+            }
+            if (handler.getRecordCount() > req.getMaximumRecords()) {
+                return makeError("Endpoint did not honor upper requested limit for " +
+                                "\"maximumRecords\" parameter (up to " +
+                                req.getMaximumRecords() +
+                                " records where requested and endpoint delivered " +
+                                handler.getRecordCount() + " results)");
+            }
+            return makeSuccess();
+        }
+    }
+
+}
Index: /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestSearch13.java
===================================================================
--- /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestSearch13.java	(revision 7180)
+++ /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestSearch13.java	(revision 7180)
@@ -0,0 +1,157 @@
+/**
+ * This software is copyright (c) 2013 by
+ *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ * This is free software. You can redistribute it
+ * and/or modify it under the terms described in
+ * the GNU General Public License v3 of which you
+ * should have received a copy. Otherwise you can download
+ * it from
+ *
+ *   http://www.gnu.org/licenses/gpl-3.0.txt
+ *
+ * @copyright Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ *
+ * @license http://www.gnu.org/licenses/gpl-3.0.txt
+ *  GNU General Public License v3
+ */
+package eu.clarin.fcs.tester.tests;
+
+import eu.clarin.fcs.tester.FCSTest;
+import eu.clarin.fcs.tester.FCSTestCase;
+import eu.clarin.fcs.tester.FCSTestContext;
+import eu.clarin.fcs.tester.FCSTestProfile;
+import eu.clarin.fcs.tester.FCSTestHandler;
+import eu.clarin.fcs.tester.FCSTestHandler.SurrogateDiagnostic;
+import eu.clarin.fcs.tester.FCSTestResult;
+import eu.clarin.sru.client.SRUClientException;
+import eu.clarin.sru.client.SRUDiagnostic;
+import eu.clarin.sru.client.SRUSearchRetrieveRequest;
+import eu.clarin.sru.client.SRUSimpleClient;
+import eu.clarin.sru.client.SRUSurrogateRecordData;
+import eu.clarin.sru.client.fcs.ClarinFCSConstants;
+import eu.clarin.sru.client.fcs.ClarinFCSRecordData;
+import eu.clarin.sru.client.fcs.DataView;
+import eu.clarin.sru.client.fcs.DataViewHits;
+import eu.clarin.sru.client.fcs.Resource;
+import eu.clarin.sru.client.fcs.Resource.ResourceFragment;
+
+@FCSTestCase(priority=4000, profiles = {
+        FCSTestProfile.CLARIN_FCS_1_0,
+        FCSTestProfile.CLARIN_FCS_2_0
+})
+public class TestSearch13 extends FCSTest {
+    private static final String FCS_RECORD_SCHEMA =
+            ClarinFCSRecordData.RECORD_SCHEMA;
+
+    @Override
+    public String getName() {
+        return "SearchRetrieve";
+    }
+
+
+    @Override
+    public String getDescription() {
+        return "Search for user specified search term and " +
+                "requesting endpoint to return results in CLARIN-FCS " +
+                "record schema '" + FCS_RECORD_SCHEMA + "'";
+    }
+
+
+    @Override
+    public String getExpected() {
+        return "Expecting at least one record in CLARIN-FCS record " +
+                "schema (without any surrogate diagnostics)";
+    }
+
+
+    @Override
+    public FCSTestResult perform(FCSTestContext context, SRUSimpleClient client,
+            FCSTestHandler handler) throws SRUClientException {
+        SRUSearchRetrieveRequest req = context.createSearchRetrieveRequest();
+        req.setQuery(ClarinFCSConstants.QUERY_TYPE_CQL,
+                escapeCQL(context.getUserSearchTerm()));
+        req.setRecordSchema(FCS_RECORD_SCHEMA);
+        req.setMaximumRecords(5);
+        client.searchRetrieve(req, handler);
+        if (handler.findDiagnostic("info:srw/diagnostic/1/66")) {
+            return makeError("Endpoint claims to not " +
+                    "support FCS record schema (" + FCS_RECORD_SCHEMA + ")");
+        } else if (handler.getRecordCount() == 0) {
+            return makeWarning("Endpoint has no results " +"" +
+                    "for search term \"" + context.getUserSearchTerm() +
+                    "\". Please supply a different search term.");
+        } else {
+            for (FCSTestHandler.Record record : handler.getRecords()) {
+                String recordSchema = record.getData().getRecordSchema();
+                if (SRUSurrogateRecordData.RECORD_SCHEMA.equals(recordSchema)) {
+                    final SurrogateDiagnostic data =
+                            (SurrogateDiagnostic) record.getData();
+                    final SRUDiagnostic d = data.getDiagnostic();
+
+                    if (data.isDiagnostic("info:srw/diagnostic/1/67")) {
+                        return makeError("Endpoint cannot render record in " +
+                                "CLARIN-FCS record format and returned " +
+                                "surrogate diagnostic \"info:srw/diagnostic/1/67\" " +
+                                "instead.");
+                    } else if (data.isDiagnostic("info:clarin/sru/diagnostic/2")) {
+                        return makeError("Endpoint sent one or more records with record " +
+                                        "schema of '" + d.getDetails() +
+                                        "' instead of '" + FCS_RECORD_SCHEMA +
+                                        "'.");
+                    } else {
+                        StringBuilder sb = new StringBuilder();
+                        sb.append("Endpoint returned unexpected surrgogate ")
+                                .append("diagnostic \"")
+                                .append(d.getURI()).append("\"");
+                        if (d.getDetails() != null) {
+                            sb.append("; details = \"")
+                                .append(d.getDetails()).append("\"");
+                        }
+                        if (d.getMessage() != null) {
+                            sb.append("; message = \"")
+                                .append(d.getMessage()).append("\"");
+                        }
+                        return makeError(sb.toString());
+                    }
+                } else if (FCS_RECORD_SCHEMA.equals(recordSchema)) {
+                    final ClarinFCSRecordData data =
+                            (ClarinFCSRecordData) record.getData();
+                    final Resource resource = data.getResource();
+                    boolean foundHits = false;
+                    if (resource.hasDataViews()) {
+                        for (DataView dataView : resource.getDataViews()) {
+                            if (dataView.isMimeType(DataViewHits.TYPE)) {
+                                foundHits = true;
+                            }
+                        }
+                    }
+
+                    if (resource.hasResourceFragments()) {
+                        for (ResourceFragment fragment : resource.getResourceFragments()) {
+                            for (DataView dataView : fragment.getDataViews()) {
+                                if (dataView.isMimeType(DataViewHits.TYPE)) {
+                                    foundHits = true;
+                                }
+                            }
+                        }
+                    }
+                    if (!foundHits) {
+                        return makeError("Endpoint did not provide mandatory HITS dataview in results");
+                    }
+
+                } else {
+                    return makeError("Endpoint does not supply results in FCS record schema (" + FCS_RECORD_SCHEMA + "\"");
+                }
+            }
+            if (handler.getRecordCount() > req.getMaximumRecords()) {
+                return makeError("Endpoint did not honor upper requested limit for " +
+                                "\"maximumRecords\" parameter (up to " +
+                                req.getMaximumRecords() +
+                                " records where requested and endpoint delivered " +
+                                handler.getRecordCount() + " results)");
+            }
+            return makeSuccess();
+        }
+    }
+
+}
Index: /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestSearch14.java
===================================================================
--- /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestSearch14.java	(revision 7180)
+++ /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestSearch14.java	(revision 7180)
@@ -0,0 +1,167 @@
+/**
+ * This software is copyright (c) 2013 by
+ *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ * This is free software. You can redistribute it
+ * and/or modify it under the terms described in
+ * the GNU General Public License v3 of which you
+ * should have received a copy. Otherwise you can download
+ * it from
+ *
+ *   http://www.gnu.org/licenses/gpl-3.0.txt
+ *
+ * @copyright Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ *
+ * @license http://www.gnu.org/licenses/gpl-3.0.txt
+ *  GNU General Public License v3
+ */
+package eu.clarin.fcs.tester.tests;
+
+import eu.clarin.fcs.tester.FCSTest;
+import eu.clarin.fcs.tester.FCSTestCase;
+import eu.clarin.fcs.tester.FCSTestContext;
+import eu.clarin.fcs.tester.FCSTestProfile;
+import eu.clarin.fcs.tester.FCSTestHandler;
+import eu.clarin.fcs.tester.FCSTestHandler.SurrogateDiagnostic;
+import eu.clarin.fcs.tester.FCSTestResult;
+import eu.clarin.sru.client.SRUClientException;
+import eu.clarin.sru.client.SRUDiagnostic;
+import eu.clarin.sru.client.SRUSearchRetrieveRequest;
+import eu.clarin.sru.client.SRUSimpleClient;
+import eu.clarin.sru.client.SRUSurrogateRecordData;
+import eu.clarin.sru.client.fcs.ClarinFCSConstants;
+import eu.clarin.sru.client.fcs.ClarinFCSRecordData;
+import eu.clarin.sru.client.fcs.DataView;
+import eu.clarin.sru.client.fcs.DataViewAdvanced;
+import eu.clarin.sru.client.fcs.DataViewHits;
+import eu.clarin.sru.client.fcs.Resource;
+import eu.clarin.sru.client.fcs.Resource.ResourceFragment;
+
+@FCSTestCase(priority=4100, profiles = {
+        FCSTestProfile.CLARIN_FCS_2_0
+})
+public class TestSearch14 extends FCSTest {
+    private static final String FCS_RECORD_SCHEMA =
+            ClarinFCSRecordData.RECORD_SCHEMA;
+
+    @Override
+    public String getName() {
+        return "SearchRetrieve";
+    }
+
+
+    @Override
+    public String getDescription() {
+        return "Advanced-Search for user specified search term and " +
+                "requesting endpoint to return results in CLARIN-FCS " +
+                "record schema '" + FCS_RECORD_SCHEMA + "'";
+    }
+
+
+    @Override
+    public String getExpected() {
+        return "Expecting at least one record in CLARIN-FCS record " +
+                "schema (without any surrogate diagnostics)";
+    }
+
+
+    @Override
+    public FCSTestResult perform(FCSTestContext context, SRUSimpleClient client,
+            FCSTestHandler handler) throws SRUClientException {
+        SRUSearchRetrieveRequest req = context.createSearchRetrieveRequest();
+        req.setQuery(ClarinFCSConstants.QUERY_TYPE_FCS,
+                escapeFCS(context.getUserSearchTerm()));
+        req.setRecordSchema(FCS_RECORD_SCHEMA);
+        req.setMaximumRecords(5);
+        client.searchRetrieve(req, handler);
+        if (handler.findDiagnostic("info:srw/diagnostic/1/66")) {
+            return makeError("Endpoint claims to not " +
+                    "support FCS record schema (" + FCS_RECORD_SCHEMA + ")");
+        } else if (handler.getRecordCount() == 0) {
+            return makeWarning("Endpoint has no results " +"" +
+                    "for search term \"" + context.getUserSearchTerm() +
+                    "\". Please supply a different search term.");
+        } else {
+            for (FCSTestHandler.Record record : handler.getRecords()) {
+                String recordSchema = record.getData().getRecordSchema();
+                if (SRUSurrogateRecordData.RECORD_SCHEMA.equals(recordSchema)) {
+                    final SurrogateDiagnostic data =
+                            (SurrogateDiagnostic) record.getData();
+                    final SRUDiagnostic d = data.getDiagnostic();
+
+                    if (data.isDiagnostic("info:srw/diagnostic/1/67")) {
+                        return makeError("Endpoint cannot render record in " +
+                                "CLARIN-FCS record format and returned " +
+                                "surrogate diagnostic \"info:srw/diagnostic/1/67\" " +
+                                "instead.");
+                    } else if (data.isDiagnostic("info:clarin/sru/diagnostic/2")) {
+                        return makeError("Endpoint sent one or more records with record " +
+                                        "schema of '" + d.getDetails() +
+                                        "' instead of '" + FCS_RECORD_SCHEMA +
+                                        "'.");
+                    } else {
+                        StringBuilder sb = new StringBuilder();
+                        sb.append("Endpoint returned unexpected surrgogate ")
+                                .append("diagnostic \"")
+                                .append(d.getURI()).append("\"");
+                        if (d.getDetails() != null) {
+                            sb.append("; details = \"")
+                                .append(d.getDetails()).append("\"");
+                        }
+                        if (d.getMessage() != null) {
+                            sb.append("; message = \"")
+                                .append(d.getMessage()).append("\"");
+                        }
+                        return makeError(sb.toString());
+                    }
+                } else if (FCS_RECORD_SCHEMA.equals(recordSchema)) {
+                    final ClarinFCSRecordData data =
+                            (ClarinFCSRecordData) record.getData();
+                    final Resource resource = data.getResource();
+                    boolean foundHits = false;
+                    boolean foundAdv  = false;
+                    if (resource.hasDataViews()) {
+                        for (DataView dataView : resource.getDataViews()) {
+                            if (dataView.isMimeType(DataViewHits.TYPE)) {
+                                foundHits = true;
+                            }
+                            if (dataView.isMimeType(DataViewAdvanced.TYPE)) {
+                                foundAdv = true;
+                            }
+                        }
+                    }
+
+                    if (resource.hasResourceFragments()) {
+                        for (ResourceFragment fragment : resource.getResourceFragments()) {
+                            for (DataView dataView : fragment.getDataViews()) {
+                                if (dataView.isMimeType(DataViewHits.TYPE)) {
+                                    foundHits = true;
+                                }
+                                if (dataView.isMimeType(DataViewAdvanced.TYPE)) {
+                                    foundAdv = true;
+                                }
+                            }
+                        }
+                    }
+                    if (!(foundHits && foundAdv)) {
+                        return makeError("Endpoint did not provide mandatory HITS and Advanced (ADV) dataviews in results");
+                    } else if (!foundHits) {
+                        return makeError("Endpoint did not provide mandatory HITS dataview in results");
+                    } else if (!foundAdv) {
+                        return makeError("Endpoint did not provide mandatory Advanced (ADV) dataview in results");
+                    }
+                } else {
+                    return makeError("Endpoint does not supply results in FCS record schema (" + FCS_RECORD_SCHEMA + "\"");
+                }
+            }
+            if (handler.getRecordCount() > req.getMaximumRecords()) {
+                return makeError("Endpoint did not honor upper requested limit for " +
+                                "\"maximumRecords\" parameter (up to " +
+                                req.getMaximumRecords() +
+                                " records where requested and endpoint delivered " +
+                                handler.getRecordCount() + " results)");
+            }
+            return makeSuccess();
+        }
+    }
+
+}
Index: /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestSearch2.java
===================================================================
--- /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestSearch2.java	(revision 7180)
+++ /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestSearch2.java	(revision 7180)
@@ -0,0 +1,70 @@
+/**
+ * This software is copyright (c) 2013 by
+ *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ * This is free software. You can redistribute it
+ * and/or modify it under the terms described in
+ * the GNU General Public License v3 of which you
+ * should have received a copy. Otherwise you can download
+ * it from
+ *
+ *   http://www.gnu.org/licenses/gpl-3.0.txt
+ *
+ * @copyright Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ *
+ * @license http://www.gnu.org/licenses/gpl-3.0.txt
+ *  GNU General Public License v3
+ */
+package eu.clarin.fcs.tester.tests;
+
+import eu.clarin.fcs.tester.FCSTest;
+import eu.clarin.fcs.tester.FCSTestCase;
+import eu.clarin.fcs.tester.FCSTestContext;
+import eu.clarin.fcs.tester.FCSTestProfile;
+import eu.clarin.fcs.tester.FCSTestHandler;
+import eu.clarin.fcs.tester.FCSTestResult;
+import eu.clarin.sru.client.SRUClientConstants;
+import eu.clarin.sru.client.SRUClientException;
+import eu.clarin.sru.client.SRUSearchRetrieveRequest;
+import eu.clarin.sru.client.SRUSimpleClient;
+import eu.clarin.sru.client.fcs.ClarinFCSRecordData;
+
+@FCSTestCase(priority=Integer.MIN_VALUE, profiles = {
+        FCSTestProfile.CLARIN_FCS_1_0,
+        FCSTestProfile.CLARIN_FCS_2_0,
+        FCSTestProfile.CLARIN_FCS_LEGACY
+})
+public class TestSearch2 extends FCSTest {
+
+    @Override
+    public String getName() {
+        return "SearchRetrieve";
+    }
+
+
+    @Override
+    public String getDescription() {
+        return "Searching for random string with CLARIN FCS " +
+                "record schema '" + ClarinFCSRecordData.RECORD_SCHEMA + "'";
+    }
+
+
+    @Override
+    public String getExpected() {
+        return "No errors or diagnostics";
+    }
+
+
+    @Override
+    public FCSTestResult perform(FCSTestContext context, SRUSimpleClient client,
+            FCSTestHandler handler) throws SRUClientException {
+        SRUSearchRetrieveRequest req = context.createSearchRetrieveRequest();
+        req.setQuery(SRUClientConstants.QUERY_TYPE_CQL,
+                escapeCQL(context.getRandomSearchTerm()));
+        req.setRecordSchema(ClarinFCSRecordData.RECORD_SCHEMA);
+        client.searchRetrieve(req, handler);
+        return handler.getDiagnosticCount() == 0
+                ? makeSuccess()
+                : makeWarningUnexpectedDiagnostics();
+    }
+
+}
Index: /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestSearch3.java
===================================================================
--- /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestSearch3.java	(revision 7180)
+++ /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestSearch3.java	(revision 7180)
@@ -0,0 +1,64 @@
+/**
+ * This software is copyright (c) 2013 by
+ *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ * This is free software. You can redistribute it
+ * and/or modify it under the terms described in
+ * the GNU General Public License v3 of which you
+ * should have received a copy. Otherwise you can download
+ * it from
+ *
+ *   http://www.gnu.org/licenses/gpl-3.0.txt
+ *
+ * @copyright Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ *
+ * @license http://www.gnu.org/licenses/gpl-3.0.txt
+ *  GNU General Public License v3
+ */
+package eu.clarin.fcs.tester.tests;
+
+import eu.clarin.fcs.tester.FCSTest;
+import eu.clarin.fcs.tester.FCSTestCase;
+import eu.clarin.fcs.tester.FCSTestContext;
+import eu.clarin.fcs.tester.FCSTestProfile;
+import eu.clarin.fcs.tester.FCSTestHandler;
+import eu.clarin.fcs.tester.FCSTestResult;
+import eu.clarin.sru.client.SRUClientException;
+import eu.clarin.sru.client.SRUSearchRetrieveRequest;
+import eu.clarin.sru.client.SRUSimpleClient;
+
+
+@FCSTestCase(priority = 3030, profiles = {
+        FCSTestProfile.CLARIN_FCS_LEGACY
+})
+public class TestSearch3 extends FCSTest {
+
+    @Override
+    public String getName() {
+        return "SearchRetrieve";
+    }
+
+
+    @Override
+    public String getDescription() {
+        return "Search with missing 'query' argument";
+    }
+
+
+    @Override
+    public String getExpected() {
+        return "Expecting diagnostic \"info:srw/diagnostic/1/7\"";
+    }
+
+
+    @Override
+    public FCSTestResult perform(FCSTestContext context, SRUSimpleClient client,
+            FCSTestHandler handler) throws SRUClientException {
+        SRUSearchRetrieveRequest req = context.createSearchRetrieveRequest();
+        req.setExtraRequestData(SRUSearchRetrieveRequest.X_MALFORMED_QUERY,
+                SRUSearchRetrieveRequest.MALFORMED_OMIT);
+        client.searchRetrieve(req, handler);
+        return handler.findDiagnostic("info:srw/diagnostic/1/7")
+                ? makeSuccess()
+                : makeErrorNoDiagnostic("info:srw/diagnostic/1/7");
+    }
+}
Index: /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestSearch4.java
===================================================================
--- /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestSearch4.java	(revision 7180)
+++ /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestSearch4.java	(revision 7180)
@@ -0,0 +1,70 @@
+/**
+ * This software is copyright (c) 2013 by
+ *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ * This is free software. You can redistribute it
+ * and/or modify it under the terms described in
+ * the GNU General Public License v3 of which you
+ * should have received a copy. Otherwise you can download
+ * it from
+ *
+ *   http://www.gnu.org/licenses/gpl-3.0.txt
+ *
+ * @copyright Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ *
+ * @license http://www.gnu.org/licenses/gpl-3.0.txt
+ *  GNU General Public License v3
+ */
+package eu.clarin.fcs.tester.tests;
+
+import eu.clarin.fcs.tester.FCSTest;
+import eu.clarin.fcs.tester.FCSTestCase;
+import eu.clarin.fcs.tester.FCSTestContext;
+import eu.clarin.fcs.tester.FCSTestProfile;
+import eu.clarin.fcs.tester.FCSTestHandler;
+import eu.clarin.fcs.tester.FCSTestResult;
+import eu.clarin.sru.client.SRUClientConstants;
+import eu.clarin.sru.client.SRUClientException;
+import eu.clarin.sru.client.SRUSearchRetrieveRequest;
+import eu.clarin.sru.client.SRUSimpleClient;
+
+
+@FCSTestCase(priority = 3040, profiles = {
+        FCSTestProfile.CLARIN_FCS_1_0,
+        FCSTestProfile.CLARIN_FCS_2_0,
+        FCSTestProfile.CLARIN_FCS_LEGACY
+})
+public class TestSearch4 extends FCSTest {
+
+    @Override
+    public String getName() {
+        return "SearchRetrieve";
+    }
+
+
+    @Override
+    public String getDescription() {
+        return "Search with invalid 'recordPacking' argument";
+    }
+
+
+    @Override
+    public String getExpected() {
+        return "Expecting diagnostic \"info:srw/diagnostic/1/71\"";
+    }
+
+
+    @Override
+    public FCSTestResult perform(FCSTestContext context, SRUSimpleClient client,
+            FCSTestHandler handler) throws SRUClientException {
+        SRUSearchRetrieveRequest req = context.createSearchRetrieveRequest();
+        req.setQuery(SRUClientConstants.QUERY_TYPE_CQL,
+                escapeCQL(context.getRandomSearchTerm()));
+        req.setExtraRequestData(
+                SRUSearchRetrieveRequest.X_MALFORMED_RECORD_XML_ESCAPING, "invalid");
+        client.searchRetrieve(req, handler);
+        return handler.findDiagnostic("info:srw/diagnostic/1/71")
+                ? makeSuccess()
+                : makeErrorNoDiagnostic("info:srw/diagnostic/1/71");
+    }
+
+}
Index: /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestSearch5.java
===================================================================
--- /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestSearch5.java	(revision 7180)
+++ /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestSearch5.java	(revision 7180)
@@ -0,0 +1,70 @@
+/**
+ * This software is copyright (c) 2013 by
+ *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ * This is free software. You can redistribute it
+ * and/or modify it under the terms described in
+ * the GNU General Public License v3 of which you
+ * should have received a copy. Otherwise you can download
+ * it from
+ *
+ *   http://www.gnu.org/licenses/gpl-3.0.txt
+ *
+ * @copyright Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ *
+ * @license http://www.gnu.org/licenses/gpl-3.0.txt
+ *  GNU General Public License v3
+ */
+package eu.clarin.fcs.tester.tests;
+
+import eu.clarin.fcs.tester.FCSTest;
+import eu.clarin.fcs.tester.FCSTestCase;
+import eu.clarin.fcs.tester.FCSTestContext;
+import eu.clarin.fcs.tester.FCSTestProfile;
+import eu.clarin.fcs.tester.FCSTestHandler;
+import eu.clarin.fcs.tester.FCSTestResult;
+import eu.clarin.sru.client.SRUClientConstants;
+import eu.clarin.sru.client.SRUClientException;
+import eu.clarin.sru.client.SRUSearchRetrieveRequest;
+import eu.clarin.sru.client.SRUSimpleClient;
+
+
+@FCSTestCase(priority = 3050, profiles = {
+        FCSTestProfile.CLARIN_FCS_1_0,
+        FCSTestProfile.CLARIN_FCS_2_0,
+        FCSTestProfile.CLARIN_FCS_LEGACY
+})
+public class TestSearch5 extends FCSTest {
+
+    @Override
+    public String getName() {
+        return "SearchRetrieve";
+    }
+
+
+    @Override
+    public String getDescription() {
+        return "Search with invalid value for 'startRecord' argument";
+    }
+
+
+    @Override
+    public String getExpected() {
+        return "Expecting diagnostic \"info:srw/diagnostic/1/6\"";
+    }
+
+
+    @Override
+    public FCSTestResult perform(FCSTestContext context, SRUSimpleClient client,
+            FCSTestHandler handler) throws SRUClientException {
+        SRUSearchRetrieveRequest req = context.createSearchRetrieveRequest();
+        req.setQuery(SRUClientConstants.QUERY_TYPE_CQL,
+                escapeCQL(context.getRandomSearchTerm()));
+        req.setExtraRequestData(
+                SRUSearchRetrieveRequest.X_MALFORMED_START_RECORD, "invalid");
+        client.searchRetrieve(req, handler);
+        return handler.findDiagnostic("info:srw/diagnostic/1/6")
+                ? makeSuccess()
+                : makeErrorNoDiagnostic("info:srw/diagnostic/1/6");
+    }
+
+}
Index: /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestSearch6.java
===================================================================
--- /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestSearch6.java	(revision 7180)
+++ /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestSearch6.java	(revision 7180)
@@ -0,0 +1,70 @@
+/**
+ * This software is copyright (c) 2013 by
+ *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ * This is free software. You can redistribute it
+ * and/or modify it under the terms described in
+ * the GNU General Public License v3 of which you
+ * should have received a copy. Otherwise you can download
+ * it from
+ *
+ *   http://www.gnu.org/licenses/gpl-3.0.txt
+ *
+ * @copyright Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ *
+ * @license http://www.gnu.org/licenses/gpl-3.0.txt
+ *  GNU General Public License v3
+ */
+package eu.clarin.fcs.tester.tests;
+
+import eu.clarin.fcs.tester.FCSTest;
+import eu.clarin.fcs.tester.FCSTestCase;
+import eu.clarin.fcs.tester.FCSTestContext;
+import eu.clarin.fcs.tester.FCSTestProfile;
+import eu.clarin.fcs.tester.FCSTestHandler;
+import eu.clarin.fcs.tester.FCSTestResult;
+import eu.clarin.sru.client.SRUClientConstants;
+import eu.clarin.sru.client.SRUClientException;
+import eu.clarin.sru.client.SRUSearchRetrieveRequest;
+import eu.clarin.sru.client.SRUSimpleClient;
+
+
+@FCSTestCase(priority = 3060, profiles = {
+        FCSTestProfile.CLARIN_FCS_1_0,
+        FCSTestProfile.CLARIN_FCS_2_0,
+        FCSTestProfile.CLARIN_FCS_LEGACY
+})
+public class TestSearch6 extends FCSTest {
+
+    @Override
+    public String getName() {
+        return "SearchRetrieve";
+    }
+
+
+    @Override
+    public String getDescription() {
+        return "Search with invalid value of 0 for 'startRecord' argument";
+    }
+
+
+    @Override
+    public String getExpected() {
+        return "Expecting diagnostic \"info:srw/diagnostic/1/6\"";
+    }
+
+
+    @Override
+    public FCSTestResult perform(FCSTestContext context, SRUSimpleClient client,
+            FCSTestHandler handler) throws SRUClientException {
+        SRUSearchRetrieveRequest req = context.createSearchRetrieveRequest();
+        req.setQuery(SRUClientConstants.QUERY_TYPE_CQL,
+                escapeCQL(context.getRandomSearchTerm()));
+        req.setExtraRequestData(
+                SRUSearchRetrieveRequest.X_MALFORMED_START_RECORD, "0");
+        client.searchRetrieve(req, handler);
+        return handler.findDiagnostic("info:srw/diagnostic/1/6")
+                ? makeSuccess()
+                : makeErrorNoDiagnostic("info:srw/diagnostic/1/6");
+    }
+
+}
Index: /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestSearch7.java
===================================================================
--- /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestSearch7.java	(revision 7180)
+++ /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestSearch7.java	(revision 7180)
@@ -0,0 +1,70 @@
+/**
+ * This software is copyright (c) 2013 by
+ *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ * This is free software. You can redistribute it
+ * and/or modify it under the terms described in
+ * the GNU General Public License v3 of which you
+ * should have received a copy. Otherwise you can download
+ * it from
+ *
+ *   http://www.gnu.org/licenses/gpl-3.0.txt
+ *
+ * @copyright Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ *
+ * @license http://www.gnu.org/licenses/gpl-3.0.txt
+ *  GNU General Public License v3
+ */
+package eu.clarin.fcs.tester.tests;
+
+import eu.clarin.fcs.tester.FCSTest;
+import eu.clarin.fcs.tester.FCSTestCase;
+import eu.clarin.fcs.tester.FCSTestContext;
+import eu.clarin.fcs.tester.FCSTestProfile;
+import eu.clarin.fcs.tester.FCSTestHandler;
+import eu.clarin.fcs.tester.FCSTestResult;
+import eu.clarin.sru.client.SRUClientConstants;
+import eu.clarin.sru.client.SRUClientException;
+import eu.clarin.sru.client.SRUSearchRetrieveRequest;
+import eu.clarin.sru.client.SRUSimpleClient;
+
+
+@FCSTestCase(priority = 3070, profiles = {
+        FCSTestProfile.CLARIN_FCS_1_0,
+        FCSTestProfile.CLARIN_FCS_2_0,
+        FCSTestProfile.CLARIN_FCS_LEGACY
+})
+public class TestSearch7 extends FCSTest {
+
+    @Override
+    public String getName() {
+        return "SearchRetrieve";
+    }
+
+
+    @Override
+    public String getDescription() {
+        return "Search with invalid value for 'maximumRecords' argument";
+    }
+
+
+    @Override
+    public String getExpected() {
+        return "Expecting diagnostic \"info:srw/diagnostic/1/6\"";
+    }
+
+
+    @Override
+    public FCSTestResult perform(FCSTestContext context, SRUSimpleClient client,
+            FCSTestHandler handler) throws SRUClientException {
+        SRUSearchRetrieveRequest req = context.createSearchRetrieveRequest();
+        req.setQuery(SRUClientConstants.QUERY_TYPE_CQL,
+                escapeCQL(context.getRandomSearchTerm()));
+        req.setExtraRequestData(
+                SRUSearchRetrieveRequest.X_MALFORMED_MAXIMUM_RECORDS, "invalid");
+        client.searchRetrieve(req, handler);
+        return handler.findDiagnostic("info:srw/diagnostic/1/6")
+                ? makeSuccess()
+                : makeErrorNoDiagnostic("info:srw/diagnostic/1/6");
+    }
+
+}
Index: /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestSearch8.java
===================================================================
--- /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestSearch8.java	(revision 7180)
+++ /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestSearch8.java	(revision 7180)
@@ -0,0 +1,70 @@
+/**
+ * This software is copyright (c) 2013 by
+ *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ * This is free software. You can redistribute it
+ * and/or modify it under the terms described in
+ * the GNU General Public License v3 of which you
+ * should have received a copy. Otherwise you can download
+ * it from
+ *
+ *   http://www.gnu.org/licenses/gpl-3.0.txt
+ *
+ * @copyright Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ *
+ * @license http://www.gnu.org/licenses/gpl-3.0.txt
+ *  GNU General Public License v3
+ */
+package eu.clarin.fcs.tester.tests;
+
+import eu.clarin.fcs.tester.FCSTest;
+import eu.clarin.fcs.tester.FCSTestCase;
+import eu.clarin.fcs.tester.FCSTestContext;
+import eu.clarin.fcs.tester.FCSTestProfile;
+import eu.clarin.fcs.tester.FCSTestHandler;
+import eu.clarin.fcs.tester.FCSTestResult;
+import eu.clarin.sru.client.SRUClientConstants;
+import eu.clarin.sru.client.SRUClientException;
+import eu.clarin.sru.client.SRUSearchRetrieveRequest;
+import eu.clarin.sru.client.SRUSimpleClient;
+
+
+@FCSTestCase(priority = 3080, profiles = {
+        FCSTestProfile.CLARIN_FCS_1_0,
+        FCSTestProfile.CLARIN_FCS_2_0,
+        FCSTestProfile.CLARIN_FCS_LEGACY
+})
+public class TestSearch8 extends FCSTest {
+
+    @Override
+    public String getName() {
+        return "SearchRetrieve";
+    }
+
+
+    @Override
+    public String getDescription() {
+        return "Search with invalid value of -1 for 'maximumRecords' argument";
+    }
+
+
+    @Override
+    public String getExpected() {
+        return "Expecting diagnostic \"info:srw/diagnostic/1/6\"";
+    }
+
+
+    @Override
+    public FCSTestResult perform(FCSTestContext context, SRUSimpleClient client,
+            FCSTestHandler handler) throws SRUClientException {
+        SRUSearchRetrieveRequest req = context.createSearchRetrieveRequest();
+        req.setQuery(SRUClientConstants.QUERY_TYPE_CQL,
+                escapeCQL(context.getRandomSearchTerm()));
+        req.setExtraRequestData(
+                SRUSearchRetrieveRequest.X_MALFORMED_MAXIMUM_RECORDS, "-1");
+        client.searchRetrieve(req, handler);
+        return handler.findDiagnostic("info:srw/diagnostic/1/6")
+                ? makeSuccess()
+                : makeErrorNoDiagnostic("info:srw/diagnostic/1/6");
+    }
+
+}
Index: /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestSearch9.java
===================================================================
--- /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestSearch9.java	(revision 7180)
+++ /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/tests/TestSearch9.java	(revision 7180)
@@ -0,0 +1,68 @@
+/**
+ * This software is copyright (c) 2013 by
+ *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ * This is free software. You can redistribute it
+ * and/or modify it under the terms described in
+ * the GNU General Public License v3 of which you
+ * should have received a copy. Otherwise you can download
+ * it from
+ *
+ *   http://www.gnu.org/licenses/gpl-3.0.txt
+ *
+ * @copyright Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ *
+ * @license http://www.gnu.org/licenses/gpl-3.0.txt
+ *  GNU General Public License v3
+ */
+package eu.clarin.fcs.tester.tests;
+
+import eu.clarin.fcs.tester.FCSTest;
+import eu.clarin.fcs.tester.FCSTestCase;
+import eu.clarin.fcs.tester.FCSTestContext;
+import eu.clarin.fcs.tester.FCSTestProfile;
+import eu.clarin.fcs.tester.FCSTestHandler;
+import eu.clarin.fcs.tester.FCSTestResult;
+import eu.clarin.sru.client.SRUClientConstants;
+import eu.clarin.sru.client.SRUClientException;
+import eu.clarin.sru.client.SRUSearchRetrieveRequest;
+import eu.clarin.sru.client.SRUSimpleClient;
+
+
+@FCSTestCase(priority = 3090, profiles = {
+        FCSTestProfile.CLARIN_FCS_1_0,
+        FCSTestProfile.CLARIN_FCS_2_0,
+        FCSTestProfile.CLARIN_FCS_LEGACY
+})
+public class TestSearch9 extends FCSTest {
+
+    @Override
+    public String getName() {
+        return "SearchRetrieve";
+    }
+
+
+    @Override
+    public String getDescription() {
+        return "Search with invalid query";
+    }
+
+
+    @Override
+    public String getExpected() {
+        return "Expecting diagnostic \"info:srw/diagnostic/1/10\"";
+    }
+
+
+    @Override
+    public FCSTestResult perform(FCSTestContext context, SRUSimpleClient client,
+            FCSTestHandler handler) throws SRUClientException {
+        SRUSearchRetrieveRequest req = context.createSearchRetrieveRequest();
+        req.setQuery(SRUClientConstants.QUERY_TYPE_CQL,
+                "\"" + context.getRandomSearchTerm() + "\" =");
+        client.searchRetrieve(req, handler);
+        return handler.findDiagnostic("info:srw/diagnostic/1/10")
+                ? makeSuccess()
+                : makeErrorNoDiagnostic("info:srw/diagnostic/1/10");
+    }
+
+}
Index: /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/ui/NoResultsView.java
===================================================================
--- /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/ui/NoResultsView.java	(revision 7180)
+++ /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/ui/NoResultsView.java	(revision 7180)
@@ -0,0 +1,39 @@
+/**
+ * This software is copyright (c) 2013 by
+ *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ * This is free software. You can redistribute it
+ * and/or modify it under the terms described in
+ * the GNU General Public License v3 of which you
+ * should have received a copy. Otherwise you can download
+ * it from
+ *
+ *   http://www.gnu.org/licenses/gpl-3.0.txt
+ *
+ * @copyright Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ *
+ * @license http://www.gnu.org/licenses/gpl-3.0.txt
+ *  GNU General Public License v3
+ */
+package eu.clarin.fcs.tester.ui;
+
+import com.vaadin.shared.ui.label.ContentMode;
+import com.vaadin.ui.Alignment;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.VerticalLayout;
+
+@SuppressWarnings("serial")
+public class NoResultsView extends VerticalLayout {
+
+    public NoResultsView() {
+        setMargin(true);
+        setSizeFull();
+
+        final Label message =
+                new Label("<h2>No results available.</h2>", ContentMode.HTML);
+        message.setSizeUndefined();
+        message.setStyleName("no-results-label");
+        addComponent(message);
+        setComponentAlignment(message, Alignment.MIDDLE_CENTER);
+    }
+
+} // class NoResultsView
Index: /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/ui/ProgressWindow.java
===================================================================
--- /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/ui/ProgressWindow.java	(revision 7180)
+++ /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/ui/ProgressWindow.java	(revision 7180)
@@ -0,0 +1,117 @@
+/**
+ * This software is copyright (c) 2013 by
+ *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ * This is free software. You can redistribute it
+ * and/or modify it under the terms described in
+ * the GNU General Public License v3 of which you
+ * should have received a copy. Otherwise you can download
+ * it from
+ *
+ *   http://www.gnu.org/licenses/gpl-3.0.txt
+ *
+ * @copyright Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ *
+ * @license http://www.gnu.org/licenses/gpl-3.0.txt
+ *  GNU General Public License v3
+ */
+package eu.clarin.fcs.tester.ui;
+
+import com.vaadin.ui.Alignment;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.ProgressBar;
+import com.vaadin.ui.UI;
+import com.vaadin.ui.VerticalLayout;
+import com.vaadin.ui.Window;
+import com.vaadin.ui.themes.Reindeer;
+
+
+@SuppressWarnings("serial")
+public class ProgressWindow extends Window {
+    private final Label messageLabel;
+    private final ProgressBar progress;
+    private float maximum = -1;
+
+
+    public ProgressWindow(String caption, String message) {
+        super(caption);
+        setModal(true);
+        setReadOnly(true);
+        setResizable(false);
+        setStyleName(Reindeer.WINDOW_LIGHT);
+
+        VerticalLayout layout = new VerticalLayout();
+        layout.setMargin(true);
+        layout.setSpacing(true);
+        layout.setSizeUndefined();
+
+        progress = new ProgressBar();
+        progress.setIndeterminate(false);
+        progress.setWidth("350px");
+        layout.addComponent(progress);
+        layout.setComponentAlignment(progress, Alignment.MIDDLE_CENTER);
+
+        messageLabel = new Label(message);
+        messageLabel.setSizeUndefined();
+        layout.addComponent(messageLabel);
+        layout.setComponentAlignment(messageLabel, Alignment.MIDDLE_CENTER);
+        setContent(layout);
+    }
+
+
+    @Override
+    public void attach() {
+        super.attach();
+        ((TesterUI) UI.getCurrent()).enablePolling();
+    }
+
+
+    @Override
+    public void detach() {
+        ((TesterUI) UI.getCurrent()).disablePolling();
+        super.detach();
+    }
+
+
+    @Override
+    public void close() {
+        UI.getCurrent().removeWindow(ProgressWindow.this);
+    }
+
+
+//    public void updateStatus(String message) {
+//      if (message != null) {
+//          messageLabel.setValue(message);
+//      }
+//      forceRepaint();
+//    }
+
+
+    public void updateMaximum(int maximum) {
+        if ((maximum > 0) && (this.maximum < 0)) {
+            this.maximum = maximum;
+        }
+        forceRepaint();
+    }
+
+
+    public void updateStatus(String message, float done) {
+        if ((maximum > 0) && (done >= 0)) {
+            progress.setValue(Math.min(done / maximum, 1.0f));
+        }
+        if (message != null) {
+            messageLabel.setValue(message);
+        }
+        forceRepaint();
+    }
+
+
+    private void forceRepaint() {
+        markAsDirtyRecursive();
+        try {
+            Thread.sleep(125);
+        } catch (InterruptedException e) {
+            /* IGNORE */
+        }
+    }
+
+} // class ProgressWindow
Index: /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/ui/ResultsView.java
===================================================================
--- /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/ui/ResultsView.java	(revision 7180)
+++ /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/ui/ResultsView.java	(revision 7180)
@@ -0,0 +1,228 @@
+/**
+ * This software is copyright (c) 2013 by
+ *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ * This is free software. You can redistribute it
+ * and/or modify it under the terms described in
+ * the GNU General Public License v3 of which you
+ * should have received a copy. Otherwise you can download
+ * it from
+ *
+ *   http://www.gnu.org/licenses/gpl-3.0.txt
+ *
+ * @copyright Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ *
+ * @license http://www.gnu.org/licenses/gpl-3.0.txt
+ *  GNU General Public License v3
+ */
+package eu.clarin.fcs.tester.ui;
+
+import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.LogRecord;
+
+import org.apache.commons.lang.StringEscapeUtils;
+import org.joda.time.format.DateTimeFormat;
+import org.joda.time.format.DateTimeFormatter;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.vaadin.jouni.animator.AnimatorProxy;
+import org.vaadin.jouni.animator.shared.AnimType;
+
+import com.vaadin.event.MouseEvents;
+import com.vaadin.server.Resource;
+import com.vaadin.server.ThemeResource;
+import com.vaadin.shared.ui.label.ContentMode;
+import com.vaadin.ui.CssLayout;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.Panel;
+import com.vaadin.ui.VerticalLayout;
+
+import eu.clarin.fcs.tester.FCSTestContext;
+import eu.clarin.fcs.tester.FCSTestResult;
+import eu.clarin.fcs.tester.FCSTestResult.Code;
+
+@SuppressWarnings("serial")
+public class ResultsView extends VerticalLayout {
+    private static final Logger logger =
+            LoggerFactory.getLogger(ResultsView.class);
+    private static final Resource ICON_SUCCESS =
+            new ThemeResource("icons/result_success.png");
+    private static final Resource ICON_WARNING =
+            new ThemeResource("icons/result_warning.png");
+    private static final Resource ICON_ERROR   =
+            new ThemeResource("icons/result_error.png");
+    private static final DateTimeFormatter dateFmt =
+            DateTimeFormat.forPattern("yyyy-MM-dd'T'HH:mm:ss");
+
+
+    public ResultsView(FCSTestContext context, List<FCSTestResult> results) {
+        setMargin(true);
+
+        logger.debug("render results");
+
+        int count_success = 0;
+        int count_warning = 0;
+        int count_error   = 0;
+        for (FCSTestResult result : results) {
+            switch (result.getCode()) {
+            case SUCCESS:
+                count_success++;
+                break;
+            case WARNING:
+                count_warning++;
+                break;
+            case ERROR:
+                count_error++;
+                break;
+            } // switch
+        } // for
+
+        final String profileDisplayString =
+                context.getProfile().toDisplayString();
+
+        final Label resultsHeadline = new Label(String.format(
+                "<h2>Result for %s (using test profile %s):</h2>",
+                StringEscapeUtils.escapeXml(context.getBaseURI()),
+                profileDisplayString), ContentMode.HTML);
+        resultsHeadline.setStyleName("result-overall-headline");
+        addComponent(resultsHeadline);
+
+        Label resultOverall;
+        if (count_error > 0) {
+            String msg;
+            if (count_error == 1) {
+                msg = "The endpoint fails to pass in one test.";
+            } else {
+                msg = String.format("The endpoint fails to pass in %d tests.", count_error);
+            }
+            resultOverall = new Label(msg);
+            resultOverall.setIcon(ICON_ERROR);
+        } else if (count_warning > 0) {
+            String msg;
+            if (count_warning == 1) {
+                msg = "The endpoint has minor problems to pass one test.";
+            } else {
+                msg = String.format("The endpoint has minor problems to pass %d tests.", count_warning);
+            }
+            resultOverall = new Label(msg);
+            resultOverall.setIcon(getIconForCode(Code.WARNING));
+        } else {
+            resultOverall = new Label("The endpoint passed all tests successfully.");
+            resultOverall.setIcon(getIconForCode(Code.SUCCESS));
+        }
+        resultOverall.setStyleName("result-overall-label");
+        addComponent(resultOverall);
+
+        final Label resultsOverview = new Label(
+                String.format("Success: %d,  Warnings: %d, Errors: %d",
+                        count_success, count_warning, count_error));
+        addComponent(resultsOverview);
+
+        final Label resultListHeadline =
+                new Label("<h2>Results for individual test cases:</h2>", ContentMode.HTML);
+        resultListHeadline.setStyleName("result-individual-headline");
+        addComponent(resultListHeadline);
+
+        for (FCSTestResult result : results) {
+            final CssLayout content = new CssLayout();
+            content.addStyleName("result-panel-content");
+
+            final Label expectedResultLabel = new Label(
+                    String.format("<span class=\"result-label-caption\">Expected result:</span> %s",
+                            StringEscapeUtils.escapeXml(result.getExpectedResultMessage())),
+                    ContentMode.HTML);
+            expectedResultLabel.setStyleName("result-label");
+            content.addComponent(expectedResultLabel);
+
+            final Label actualResultLabel = new Label(
+                    String.format("<span class=\"result-label-caption\">Actual result:</span> <em>%s</em>",
+                            StringEscapeUtils.escapeXml(result.getActualResultMessage())),
+                    ContentMode.HTML);
+            actualResultLabel.setStyleName("result-label");
+            content.addComponent(actualResultLabel);
+
+            if (result.getLogRecords() != null) {
+                final StringBuilder sb = new StringBuilder();
+                for (LogRecord record : result.getLogRecords()) {
+                    String clazz = null;
+                    if (record.getLevel() == Level.SEVERE) {
+                        clazz = "error";
+                    } else if (record.getLevel() == Level.WARNING) {
+                        clazz = "warning";
+                    }
+                    if (clazz != null) {
+                        sb.append("<span class=\"").append(clazz).append("\">");
+                    }
+                    sb.append("<span class= \"timestamp\">")
+                        .append("[")
+                        .append(StringEscapeUtils.escapeXml(dateFmt.print(record.getMillis())))
+                        .append("] ")
+                        .append("<span>")
+                        .append(StringEscapeUtils.escapeXml(record.getMessage()));
+                    if (clazz != null) {
+                        sb.append("</span>");
+                    }
+                    sb.append("<br />");
+                }
+
+                final Label logMessages =
+                        new Label(sb.toString(), ContentMode.HTML);
+                logMessages.setCaption("Debug messages:");
+                logMessages.setStyleName("result-panel-content-messages");
+                content.addComponent(logMessages);
+            }
+
+            final String caption = String.format("[%s] %s: %s",
+                    profileDisplayString,
+                    result.getTestCaseName(),
+                    result.getTestCaseDescription());
+
+            final AnimatorProxy proxy = new AnimatorProxy();
+            proxy.setStyleName("animator");
+            final CssLayout c = new CssLayout();
+            c.setWidth("100%");
+            c.addComponent(proxy);
+
+            final Panel panel =
+                    new Panel(StringEscapeUtils.escapeXml(caption), c);
+            panel.addStyleName("result-panel");
+            panel.setIcon(getIconForCode(result.getCode()));
+            panel.addClickListener(new MouseEvents.ClickListener() {
+                boolean open = false;
+
+                @Override
+                public void click(MouseEvents.ClickEvent event) {
+                    if (open) {
+                        proxy.animate(content, AnimType.ROLL_UP_CLOSE_REMOVE);
+                        panel.removeStyleName("result-panel-opened");
+                        open = false;
+                    } else {
+                        if ((content.getParent() == null) || (content.getParent() != c)) {
+                            c.addComponent(content);
+                        }
+                        proxy.animate(content, AnimType.ROLL_DOWN_OPEN);
+                        panel.addStyleName("result-panel-opened");
+                        open = true;
+                    }
+                }
+            });
+            addComponent(panel);
+        } // for
+    }
+
+
+    private static Resource getIconForCode(FCSTestResult.Code code) {
+        if (code != null) {
+            switch (code) {
+            case SUCCESS:
+                return ICON_SUCCESS;
+            case WARNING:
+                return ICON_WARNING;
+            case ERROR:
+                return ICON_ERROR;
+            }
+        }
+        return null;
+    }
+
+} // class TestResultView
Index: /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/ui/TesterUI.java
===================================================================
--- /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/ui/TesterUI.java	(revision 7180)
+++ /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/java/eu/clarin/fcs/tester/ui/TesterUI.java	(revision 7180)
@@ -0,0 +1,537 @@
+/**
+ * This software is copyright (c) 2013-2016 by
+ *  - Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ * This is free software. You can redistribute it
+ * and/or modify it under the terms described in
+ * the GNU General Public License v3 of which you
+ * should have received a copy. Otherwise you can download
+ * it from
+ *
+ *   http://www.gnu.org/licenses/gpl-3.0.txt
+ *
+ * @copyright Institut fuer Deutsche Sprache (http://www.ids-mannheim.de)
+ *
+ * @license http://www.gnu.org/licenses/gpl-3.0.txt
+ *  GNU General Public License v3
+ */
+package eu.clarin.fcs.tester.ui;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.List;
+
+import javax.servlet.ServletContext;
+import javax.servlet.http.Cookie;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.vaadin.hene.popupbutton.PopupButton;
+
+import com.vaadin.annotations.PreserveOnRefresh;
+import com.vaadin.annotations.Theme;
+import com.vaadin.annotations.Title;
+import com.vaadin.annotations.Widgetset;
+import com.vaadin.data.Validator;
+import com.vaadin.data.Validator.InvalidValueException;
+import com.vaadin.server.ErrorMessage;
+import com.vaadin.server.UserError;
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.server.VaadinService;
+import com.vaadin.server.VaadinServlet;
+import com.vaadin.shared.ui.MarginInfo;
+import com.vaadin.shared.ui.label.ContentMode;
+import com.vaadin.ui.Alignment;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.Button.ClickEvent;
+import com.vaadin.ui.CheckBox;
+import com.vaadin.ui.ComboBox;
+import com.vaadin.ui.Component;
+import com.vaadin.ui.FormLayout;
+import com.vaadin.ui.HorizontalLayout;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.Notification;
+import com.vaadin.ui.Panel;
+import com.vaadin.ui.TextField;
+import com.vaadin.ui.UI;
+import com.vaadin.ui.VerticalLayout;
+
+import eu.clarin.fcs.tester.FCSEndpointTester;
+import eu.clarin.fcs.tester.FCSTestContext;
+import eu.clarin.fcs.tester.FCSTestProfile;
+import eu.clarin.fcs.tester.FCSTestResult;
+
+
+@SuppressWarnings("serial")
+@PreserveOnRefresh
+@Theme("clarin")
+@Title("CLARIN-FCS endpoint conformance tester")
+@Widgetset("eu.clarin.fcs.tester.ui.Widgetset")
+public class TesterUI extends UI {
+    private static final String PARAM_DEFAULT_ENDPOINT_URI =
+            "eu.clarin.fcs.tester.defaultEndpointURI";
+    private static final String PARAM_DEFAULT_SEARCH_TERM =
+            "eu.clarin.fcs.tester.defaultSearchTerm";
+    private static final String COOKIE_NAME_ENDPOINT_URI =
+            "lastEndpointURI";
+    private static final String COOKIE_NAME_SEARCH_TERM =
+            "lastSearchTerm";
+    private static final Logger logger =
+            LoggerFactory.getLogger(TesterUI.class);
+    private static final ErrorMessage ERROR_INVALID_INPUT =
+            new UserError("Invalid input:");
+    private TextField uriField;
+    private TextField queryField;
+    private ComboBox profileCombo;
+    private CheckBox strictModeCheckbox;
+    private CheckBox performProbeCheckbox;
+    private ComboBox connectTimeoutCombo;
+    private ComboBox socketTimeoutCombo;
+    private Panel content;
+    private int pollingRequests = 0;
+
+
+    @Override
+    protected void init(VaadinRequest request) {
+        logger.debug("init(): remoteAddr={}, session={}",
+                request.getRemoteAddr(), request.getWrappedSession().getId());
+
+        final ServletContext ctx =
+                VaadinServlet.getCurrent().getServletContext();
+
+        final VerticalLayout layout = new VerticalLayout();
+        layout.setSizeFull();
+        layout.setMargin(true);
+        layout.setSpacing(false);
+        layout.setStyleName("small-margin");
+        setContent(layout);
+
+        final Label title = new Label(
+                "<h1>CLARIN-FCS endpoint conformance tester</h1>",
+                ContentMode.HTML);
+        title.setStyleName("header");
+        layout.addComponent(title);
+
+        /*
+         * input panel
+         */
+        final HorizontalLayout top = new HorizontalLayout();
+        top.setSpacing(true);
+        top.setMargin(new MarginInfo(false, true, false, true));
+        top.setWidth("100%");
+        top.setStyleName("small-margin");
+
+        final FormLayout inputForm = new FormLayout();
+        top.addComponent(inputForm);
+        top.setComponentAlignment(inputForm, Alignment.MIDDLE_LEFT);
+        top.setExpandRatio(inputForm, 1.0f);
+
+        uriField = new TextField("Endpoint BaseURI:");
+        uriField.setWidth("100%");
+        uriField.setInputPrompt("Please enter BaseURI of endpoint.");
+        uriField.setRequiredError("An endpoint BaseURI is required!");
+        uriField.setMaxLength(255);
+        uriField.setNullRepresentation("");
+        uriField.setRequired(true);
+        uriField.addValidator(new Validator() {
+            @Override
+            public void validate(Object value) throws InvalidValueException {
+                if (value != null) {
+                    String s = (String) value;
+                    s = s.trim();
+                    if (!s.isEmpty()) {
+                        try {
+                            new URL(s);
+                        } catch (MalformedURLException e) {
+                            throw new InvalidValueException("Invalid URI syntax!");
+                        }
+                    }
+                }
+            }
+        });
+        String defaultEndpointURI = getCookie(COOKIE_NAME_ENDPOINT_URI);
+        if (defaultEndpointURI == null) {
+            defaultEndpointURI =
+                    ctx.getInitParameter(PARAM_DEFAULT_ENDPOINT_URI);
+            if (defaultEndpointURI != null) {
+                defaultEndpointURI = defaultEndpointURI.trim();
+                if (defaultEndpointURI.isEmpty()) {
+                    defaultEndpointURI = null;
+                }
+            }
+        }
+
+        uriField.setValue(defaultEndpointURI);
+        inputForm.addComponent(uriField);
+
+        queryField = new TextField("Search Term:");
+        queryField.setWidth("100%");
+        queryField.setInputPrompt("Please enter a word that occurs at least once in you data.");
+        queryField.setMaxLength(64);
+        queryField.setNullRepresentation("");
+        queryField.setRequired(true);
+        queryField.setRequiredError("A search term is required!");
+
+        String defaultSearchTerm = getCookie(COOKIE_NAME_SEARCH_TERM);
+        if (defaultSearchTerm == null) {
+            defaultSearchTerm = ctx.getInitParameter(PARAM_DEFAULT_SEARCH_TERM);
+            if (defaultSearchTerm != null) {
+                defaultSearchTerm = defaultSearchTerm.trim();
+            }
+        }
+        queryField.setValue(defaultSearchTerm);
+        inputForm.addComponent(queryField);
+
+        final Button goButton = new Button("Go");
+        top.addComponent(goButton);
+        top.setComponentAlignment(goButton, Alignment.MIDDLE_LEFT);
+
+        /* options panel */
+        final VerticalLayout optionsContent = new VerticalLayout();
+        optionsContent.setMargin(true);
+        optionsContent.setSpacing(true);
+        optionsContent.setStyleName("small-margin");
+
+        profileCombo = new ComboBox("CLARIN-FCS test profile:");
+        profileCombo.addItem(PROFILE_AUTODETECT);
+        profileCombo.setItemCaption(PROFILE_AUTODETECT, "Auto detect");
+        profileCombo.addItem(PROFILE_FCS_2_0);
+        profileCombo.setItemCaption(PROFILE_FCS_2_0, "CLARIN-FCS 2.0");
+        profileCombo.addItem(PROFILE_FCS_1_0);
+        profileCombo.setItemCaption(PROFILE_FCS_1_0, "CLARIN-FCS 1.0");
+        profileCombo.addItem(PROFILE_FCS_LEGACY);
+        profileCombo.setItemCaption(PROFILE_FCS_LEGACY, "Legacy FCS");
+        profileCombo.select(PROFILE_AUTODETECT);
+        profileCombo.setNullSelectionAllowed(false);
+        profileCombo.setTextInputAllowed(false);
+        profileCombo.setWidth("100%");
+        optionsContent.addComponent(profileCombo);
+
+        strictModeCheckbox = new CheckBox("Perform checks in strict mode");
+        strictModeCheckbox.setWidth("100%");
+        strictModeCheckbox.setValue(Boolean.TRUE);
+        optionsContent.addComponent(strictModeCheckbox);
+
+        performProbeCheckbox = new CheckBox("Perform HTTP HEAD probe request");
+        performProbeCheckbox.setWidth("100%");
+        performProbeCheckbox.setValue(Boolean.TRUE);
+        optionsContent.addComponent(performProbeCheckbox);
+
+        connectTimeoutCombo = new ComboBox("Connect timeout:");
+        fillTimeoutCombo(connectTimeoutCombo);
+        connectTimeoutCombo.select(TIMEOUT_15_SECONDS);
+        connectTimeoutCombo.setNullSelectionAllowed(false);
+        connectTimeoutCombo.setTextInputAllowed(false);
+        connectTimeoutCombo.setWidth("100%");
+        optionsContent.addComponent(connectTimeoutCombo);
+
+        socketTimeoutCombo = new ComboBox("Socket timeout:");
+        fillTimeoutCombo(socketTimeoutCombo);
+        socketTimeoutCombo.select(TIMEOUT_30_SECONDS);
+        socketTimeoutCombo.setNullSelectionAllowed(false);
+        socketTimeoutCombo.setTextInputAllowed(false);
+        socketTimeoutCombo.setWidth("100%");
+        optionsContent.addComponent(socketTimeoutCombo);
+
+//        final Table x = new Table("Custom Request Parameters");
+//        x.setWidth("100%");
+//        x.setHeight("200px");
+//        // x.setIt
+//        IndexedContainer data = new IndexedContainer();
+//        data.addContainerProperty("KEY", String.class, "");
+//        data.addContainerProperty("VALUE", String.class, "");
+//
+//        Object id1 = data.addItem();
+//        data.getContainerProperty(id1, "KEY").setValue("key1");
+//        data.getContainerProperty(id1, "VALUE").setValue("value1");
+//
+//        x.setContainerDataSource(data);
+//        optionsContent.addComponent(x);
+//
+//        HorizontalLayout addLayout = new HorizontalLayout();
+//        addLayout.setSpacing(true);
+//        final TextField keyField = new TextField();
+//        addLayout.addComponent(keyField);
+//        final TextField valueField = new TextField();
+//        addLayout.addComponent(valueField);
+//        final Button addButton = new Button("Add");
+//        addLayout.addComponent(addButton);
+//        optionsContent.addComponent(addLayout);
+
+        final PopupButton optionsButton = new PopupButton("Options");
+        optionsButton.setContent(optionsContent);
+        top.addComponent(optionsButton);
+        top.setComponentAlignment(optionsButton, Alignment.MIDDLE_LEFT);
+        layout.addComponent(top);
+
+        /*
+         * main content
+         */
+        content = new Panel();
+        content.setSizeFull();
+        content.setStyleName("main-content");
+        layout.addComponent(content);
+        layout.setExpandRatio(content, 1.0f);
+
+        setNoResultsView();
+
+        /* setup up some behaviors */
+        goButton.addClickListener(new Button.ClickListener() {
+            @Override
+            public void buttonClick(ClickEvent event) {
+                boolean valid = true;
+                try {
+                    uriField.validate();
+                    uriField.setComponentError(null);
+                } catch (InvalidValueException e) {
+                    valid = false;
+                    uriField.setComponentError(ERROR_INVALID_INPUT);
+                }
+                try {
+                    queryField.validate();
+                    queryField.setComponentError(null);
+                } catch (InvalidValueException e) {
+                    valid = false;
+                    queryField.setComponentError(ERROR_INVALID_INPUT);
+                }
+
+                if (valid) {
+                    performAction();
+                }
+
+            }
+        });
+
+        uriField.focus();
+
+//        final Notification info =
+//                new Notification("The CLARIN-FCS endpoint conformance tester does" +
+//                        " not yet support the new FCS specification!",
+//                        Notification.Type.ERROR_MESSAGE);
+//        info.setDelayMsec(5000);
+//        info.setDescription("(Dismiss this message by clicking it)");
+//        info.show(Page.getCurrent());
+    }
+
+
+    @Override
+    public void detach() {
+        setPollInterval(-1);
+        super.detach();
+    }
+
+
+    void enablePolling() {
+        if (++pollingRequests > 0) {
+            setPollInterval(250);
+        }
+    }
+
+
+    void disablePolling() {
+        if (--pollingRequests <= 0) {
+            setPollInterval(-1);
+            pollingRequests = 0;
+        }
+    }
+
+
+    private void setNoResultsView() {
+        Component component = content.getContent();
+        if ((component == null) ||
+                !component.getClass().equals(NoResultsView.class)) {
+            content.setContent(new NoResultsView());
+        }
+    }
+
+
+    private void performAction() {
+        FCSTestProfile profile = null;
+        switch (((Integer) profileCombo.getValue()).intValue()) {
+        case PROFILE_FCS_1_0:
+            profile = FCSTestProfile.CLARIN_FCS_1_0;
+            break;
+        case PROFILE_FCS_2_0:
+            profile = FCSTestProfile.CLARIN_FCS_2_0;
+            break;
+        case PROFILE_FCS_LEGACY:
+            profile = FCSTestProfile.CLARIN_FCS_LEGACY;
+            break;
+        default:
+            /* DO NOTHING */
+        }
+
+        final String endpointURI = uriField.getValue();
+        final String searchTerm = queryField.getValue();
+        final boolean strictMode =
+                strictModeCheckbox.getValue().booleanValue();
+        final boolean performProbeRequest =
+                performProbeCheckbox.getValue().booleanValue();
+        final int connectTimeout =
+                ((Integer) connectTimeoutCombo.getValue()).intValue();
+        final int socketTimeout =
+                ((Integer) socketTimeoutCombo.getValue()).intValue();
+
+        setCookie(COOKIE_NAME_ENDPOINT_URI, endpointURI);
+        setCookie(COOKIE_NAME_SEARCH_TERM, searchTerm);
+
+        logger.info("perform check for: profile={}, endpointURI={} query={}, strict={}",
+                profile, endpointURI, searchTerm, (strictMode ? "yes" : "no"));
+
+        final FCSEndpointTester tester = FCSEndpointTester.getInstance();
+
+        final ProgressWindow progressWindow = new ProgressWindow(
+                "Checking SRU/CQL endpoint ....", "Initializing ...");
+        setNoResultsView();
+        addWindow(progressWindow);
+
+        final FCSEndpointTester.ProgressListener listener =
+                new FCSEndpointTester.ProgressListener() {
+            private int test = -1;
+            @Override
+            public void updateProgress(final String message) {
+                accessSynchronously(new Runnable() {
+                    @Override
+                    public void run() {
+                        progressWindow.updateStatus(message, test);
+                        if (test != -1) {
+                            test++;
+                        }
+                    }
+                });
+            }
+
+            @Override
+            public void updateMaximum(final int maximum) {
+                accessSynchronously(new Runnable() {
+                    @Override
+                    public void run() {
+                        if (maximum > 0) {
+                            progressWindow.updateMaximum(maximum);
+                            test = 0;
+                        }
+                    }
+                });
+            }
+
+            @Override
+            public void onDone(final FCSTestContext context,
+                    final List<FCSTestResult> results) {
+                // force update of status bar
+                accessSynchronously(new Runnable() {
+                    @Override
+                    public void run() {
+                        progressWindow.updateStatus("Rendering results ...",
+                                Integer.MAX_VALUE);
+                    }
+                });
+
+                // render results
+                accessSynchronously(new Runnable() {
+                    @Override
+                    public void run() {
+                        content.setContent(
+                                new ResultsView(context, results));
+                        progressWindow.close();
+                    }
+                });
+            }
+
+
+            @Override
+            public void onError(final String message, Throwable t) {
+                final String desc = (t != null) ? t.getMessage() : null;
+                accessSynchronously(new Runnable() {
+                    @Override
+                    public void run() {
+                        setNoResultsView();
+                        progressWindow.close();
+                        Notification.show(message, desc,
+                                Notification.Type.ERROR_MESSAGE);
+                    }
+                });
+            }
+        };
+
+        /*
+         * now finally submit to tester for running ...
+         */
+        tester.performTests(listener,
+                    profile,
+                    endpointURI,
+                    searchTerm,
+                    strictMode,
+                    performProbeRequest,
+                    connectTimeout,
+                    socketTimeout);
+    }
+
+
+    private void readObject(java.io.ObjectInputStream in) throws IOException,
+            ClassNotFoundException {
+        in.defaultReadObject();
+        setNoResultsView();
+    }
+
+
+    private String getCookie(String name) {
+        Cookie[] cookies = VaadinService.getCurrentRequest().getCookies();
+        if (cookies != null) {
+            for (Cookie cookie : cookies) {
+                if (name.equals(cookie.getName())) {
+                    String s = cookie.getValue();
+                    if (s != null) {
+                        s = s.trim();
+                        if (s.isEmpty()) {
+                            s = null;
+                        }
+                        return s;
+                    }
+                }
+            }
+        }
+        return null;
+    }
+
+
+    private void setCookie(String name, String value) {
+        Cookie cookie = new Cookie(name, value);
+        cookie.setMaxAge(Integer.MAX_VALUE);
+        cookie.setPath(VaadinService.getCurrentRequest().getContextPath());
+        VaadinService.getCurrentResponse().addCookie(cookie);
+    }
+
+    private static final int PROFILE_AUTODETECT  = 1;
+    private static final int PROFILE_FCS_1_0     = 2;
+    private static final int PROFILE_FCS_2_0     = 3;
+    private static final int PROFILE_FCS_LEGACY = 4;
+
+    private static final int TIMEOUT_5_SECONDS   =   5 * 1000;
+    private static final int TIMEOUT_10_SECONDS  =  10 * 1000;
+    private static final int TIMEOUT_15_SECONDS  =  15 * 1000;
+    private static final int TIMEOUT_30_SECONDS  =  30 * 1000;
+    private static final int TIMEOUT_60_SECONDS  =  60 * 1000;
+    private static final int TIMEOUT_120_SECONDS = 120 * 1000;
+    private static final int TIMEOUT_180_SECONDS = 180 * 1000;
+    private static final int TIMEOUT_300_SECONDS = 300 * 1000;
+
+    private void fillTimeoutCombo(ComboBox combo) {
+        combo.addItem(TIMEOUT_5_SECONDS);
+        combo.setItemCaption(TIMEOUT_5_SECONDS, "5 seconds");
+        combo.addItem(TIMEOUT_10_SECONDS);
+        combo.setItemCaption(TIMEOUT_10_SECONDS, "10 seconds");
+        combo.addItem(TIMEOUT_15_SECONDS);
+        combo.setItemCaption(TIMEOUT_15_SECONDS, "15 seconds");
+        combo.addItem(TIMEOUT_30_SECONDS);
+        combo.setItemCaption(TIMEOUT_30_SECONDS, "30 seconds");
+        combo.addItem(TIMEOUT_60_SECONDS);
+        combo.setItemCaption(TIMEOUT_60_SECONDS, "1 minute");
+        combo.addItem(TIMEOUT_120_SECONDS);
+        combo.setItemCaption(TIMEOUT_120_SECONDS, "2 minutes");
+        combo.addItem(TIMEOUT_180_SECONDS);
+        combo.setItemCaption(TIMEOUT_180_SECONDS, "3 minutes");
+        combo.addItem(TIMEOUT_300_SECONDS);
+        combo.setItemCaption(TIMEOUT_300_SECONDS, "5 minutes");
+    }
+
+} // class TesterUI
Index: /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/resources/eu/clarin/fcs/tester/ui/Widgetset.gwt.xml
===================================================================
--- /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/resources/eu/clarin/fcs/tester/ui/Widgetset.gwt.xml	(revision 7180)
+++ /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/resources/eu/clarin/fcs/tester/ui/Widgetset.gwt.xml	(revision 7180)
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module>
+    <!--
+        This file is automatically updated based on new dependencies by the
+        goal "vaadin:update-widgetset".
+    -->
+
+    <!-- Inherit DefaultWidgetSet -->
+    <inherits name="com.vaadin.DefaultWidgetSet" /> 
+    
+    <!--
+     Uncomment the following to compile the widgetset for one browser only.
+     This can reduce the GWT compilation time significantly when debugging.
+     The line should be commented out before deployment to production
+     environments.
+      
+     Multiple browsers can be specified for GWT 1.7 as a comma separated
+     list. The supported user agents at the moment of writing were:
+     ie6,ie8,gecko,gecko1_8,safari,opera
+     
+     The value gecko1_8 is used for Firefox 3 and later and safari is used for
+     webkit based browsers including Google Chrome.
+    -->
+    <!-- <set-property name="user.agent" value="gecko1_8"/> -->
+   
+    <!--
+     To enable SuperDevMode, uncomment this line.
+     
+     SuperDevMode enables debugging of the client side of a Vaadin
+     application using the JavaScript debugger of a browser. Java code is
+     shown and debugging can take place on the Java level when using a browser
+     that support source maps (currently Chrome, implementation under work
+     for Firefox).
+     
+     After uncommenting this property, compile the widgetset once and then
+     start the SuperDevMode server process in parallel with your normal
+     server. Then add the command line parameter ?superdevmode to your
+     application URL. Vaadin Eclipse plug-in can create a launch for the
+     SuperDevMode server (Project Properties... -> Vaadin). 
+     
+     See https://vaadin.com/wiki/-/wiki/Main/Using%20SuperDevMode for more
+     information and instructions.
+    -->
+    <!-- <set-configuration-property name="devModeRedirectEnabled" value="true" /> -->
+    
+
+    <!--  add-ons -->
+    <inherits name="org.vaadin.hene.popupbutton.widgetset.PopupbuttonWidgetset" />
+    <inherits name="org.vaadin.jouni.animator.AnimatorWidgetset" />
+</module>
+
Index: /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/resources/logging.properties
===================================================================
--- /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/resources/logging.properties	(revision 7180)
+++ /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/resources/logging.properties	(revision 7180)
@@ -0,0 +1,3 @@
+#
+# Do not delete, otherwise Vaadin might disable debug logging!
+#
Index: /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/webapp/VAADIN/themes/clarin/styles.css
===================================================================
--- /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/webapp/VAADIN/themes/clarin/styles.css	(revision 7180)
+++ /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/webapp/VAADIN/themes/clarin/styles.css	(revision 7180)
@@ -0,0 +1,109 @@
+@import "../reindeer/legacy-styles.css";
+
+.header {
+	color: inherit;
+	padding: 0 0 4px 0;
+	border-bottom: 1px solid rgba(0, 0, 0, 0.25);
+}
+
+.header h1 {
+	margin: 0;
+	padding: 0 76px 0 0;
+	height: 42px;
+	line-height: 42px;
+	vertical-align: middle;
+	text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.15);;
+	background-color: transparent;
+	background-image: url("icons/clarin-d-logo.png");
+	background-attachment: scroll;
+	background-repeat: no-repeat;
+	background-position: top right;
+}
+
+.small-margin {
+	padding: 4px !important;
+}
+
+.main-content {
+	color: inherit;
+	background-color: #ffffff;
+	border: 1px solid rgba(0, 0, 0, 0.08) !important;
+}
+
+.no-results-label {
+	opacity: 0.15;
+}
+
+.result-overall-headline h2 {
+	margin: 0 0 2px 0;
+}
+
+.v-caption-result-overall-label {
+	display: inline !important;
+}
+
+.v-caption-result-overall-label img {
+	margin-top: -4px;
+}
+
+.result-overall-label {
+	font-size: 16px;
+	display: inline !important;
+}
+
+.v-slot-result-overall-label {
+	margin-bottom: 2px;
+}
+
+.result-individual-headline h2 {
+	margin: 4px 0 2px 0;
+}
+
+.result-panel .v-panel-caption img {
+	padding-right: 16px;
+	margin-top: -1px;
+}
+
+.result-panel .v-panel-caption {
+	background: transparent url("../base/common/img/sprites.png") no-repeat
+		22px -37px;
+}
+
+.result-panel-opened .v-panel-caption {
+	background-position: 11px -9px;
+}
+
+.result-panel .v-panel-content {
+	border: none;
+}
+
+.result-panel .v-panel-caption {
+	padding-bottom: 2px;
+	font-size: 16px;
+	line-height: 16px;
+	font-weight: normal;
+}
+
+.result-panel .v-panel-deco,
+.result-panel .animator {
+	display: none;
+}
+
+.result-panel-content {
+	padding: 2px;
+	margin-bottom: 4px;
+	border-left: 1px solid rgba(0, 0, 0, 0.08) !important;
+	border-right: 1px solid rgba(0, 0, 0, 0.08) !important;
+	border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
+}
+
+.result-panel .result-label {
+	padding: 1px 0 1px 0;
+	font-size: 14px;
+	line-height: 14px;
+	vertical-align: bottom;
+}
+
+.result-panel .v-caption-result-panel-content-messages {
+	margin-top: 4px;
+}
Index: /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/webapp/WEB-INF/web.xml
===================================================================
--- /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/webapp/WEB-INF/web.xml	(revision 7180)
+++ /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/webapp/WEB-INF/web.xml	(revision 7180)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns="http://java.sun.com/xml/ns/javaee"
+    xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+    version="2.5">
+    <display-name>CLARIN-FCS conformance test tool</display-name>
+
+    <listener>
+        <listener-class>eu.clarin.fcs.tester.FCSEndpointTester</listener-class>
+    </listener>
+
+    <servlet>
+        <servlet-name>vaadin</servlet-name>
+        <servlet-class>com.vaadin.server.VaadinServlet</servlet-class>
+        <init-param>
+            <description>Vaadin UI to display</description>
+            <param-name>UI</param-name>
+            <param-value>eu.clarin.fcs.tester.ui.TesterUI</param-value>
+        </init-param>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+    <servlet-mapping>
+        <servlet-name>vaadin</servlet-name>
+        <url-pattern>/app/*</url-pattern>
+    </servlet-mapping>
+    <servlet-mapping>
+        <servlet-name>vaadin</servlet-name>
+        <url-pattern>/VAADIN/*</url-pattern>
+    </servlet-mapping>
+
+    <welcome-file-list>
+        <welcome-file>index.jsp</welcome-file>
+    </welcome-file-list>
+</web-app>
Index: /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/webapp/index.jsp
===================================================================
--- /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/webapp/index.jsp	(revision 7180)
+++ /FCSEndpointTester/tags/FCSEndpointTester-1.0.0/src/main/webapp/index.jsp	(revision 7180)
@@ -0,0 +1,4 @@
+<%@ page language="java" %>
+<%
+    response.sendRedirect("app/");
+%>
