// Path: src/test/java/analyticalengine/TestUtils.java
// public final class TestUtils {
// 
//     /**
//      * The message produced when {@link #shouldHaveThrownException()} is
//      * called.
//      */
//     private static final String EXCEPTION_MSG = "Exception should have been"
//             + " thrown on previous line.";
// 
//     /**
//      * Prints the stack trace of the specified Exception to stderr and calls
//      * {@link org.junit.Assert#fail(String)} in order to fail the test in which
//      * this method is called.
//      * 
//      * @param exception
//      *            The Exception which caused the test failure.
//      */
//     public static synchronized void fail(final Throwable exception) {
//         exception.printStackTrace(System.err);
//         org.junit.Assert.fail(exception.getMessage());
//     }
// 
//     /**
//      * Fails the test in which this method is called with the message that an
//      * Exception should have been thrown on the previous line.
//      */
//     public static void shouldHaveThrownException() {
//         org.junit.Assert.fail(EXCEPTION_MSG);
//     }
// 
//     /** Instantiation disallowed. */
//     private TestUtils() {
//         // intentionally unimplemented
//     }
// }
// 
// Path: src/main/java/analyticalengine/cards/BadCard.java
// public class BadCard extends CardException {
// 
//     /**
//      * A default generated serial version UID.
//      */
//     private static final long serialVersionUID = -3311831632309378417L;
// 
//     /**
//      * Instantiates this exception with the specified error message and the
//      * specified card that caused the exception.
//      * 
//      * @param message
//      *            The error message.
//      * @param cause
//      *            The card that caused this exception.
//      */
//     public BadCard(final String message, final Card cause) {
//         super(message, cause);
//     }
// 
//     /**
//      * Instantiates this exception with the specified error message, card that
//      * caused the exception, and exception that caused the exception.
//      * 
//      * @param message
//      *            The error message.
//      * @param cardCause
//      *            The card that caused the exception.
//      * @param throwableCause
//      *            The throwable that caused this exception.
//      */
//     public BadCard(final String message, final Card cardCause,
//             final Throwable throwableCause) {
//         super(message, cardCause, throwableCause);
//     }
// 
// }
// 
// Path: src/main/java/analyticalengine/cards/UnknownCard.java
// public class UnknownCard extends Exception {
// 
//     /**
//      * A default generated serial version UID.
//      */
//     private static final long serialVersionUID = -5748344376227284027L;
// 
//     /**
//      * Creates a new exception with the specified error message.
//      * 
//      * @param string
//      *            The error message.
//      */
//     public UnknownCard(final String string) {
//         super(string);
//     }
// 
// }


import analyticalengine.cards.UnknownCard;
import java.io.BufferedWriter;
import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.file.Files;
import java.nio.file.Path;
import org.junit.Test;
import analyticalengine.TestUtils;
import analyticalengine.cards.BadCard;
/**
 * DefaultAttendantTest.java -
 * 
 * Copyright 2014-2016 Jeffrey Finkelstein.
 * 
 * This file is part of analyticalengine.
 * 
 * analyticalengine 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.
 * 
 * analyticalengine 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
 * analyticalengine. If not, see <http://www.gnu.org/licenses/>.
 */
package analyticalengine.attendant;




/**
 * Unit tets for the default attendant implementation.
 * 
 * @author Jeffrey Finkelstein &lt;jeffrey.finkelstein@gmail.com&gt;
 * @since 0.0.1
 */
public class DefaultAttendantTest extends AttendantTestBase {

    /**
     * Tests for attempting to load an unknown library file.
     * 
     * @throws IOException
     * @throws UnknownCard
     * @throws BadCard
     */
    @Test
    public void testUnknownLibraryFile()
            throws BadCard, UnknownCard, IOException {
// Path: src/test/java/analyticalengine/TestUtils.java
// public final class TestUtils {
// 
//     /**
//      * The message produced when {@link #shouldHaveThrownException()} is
//      * called.
//      */
//     private static final String EXCEPTION_MSG = "Exception should have been"
//             + " thrown on previous line.";
// 
//     /**
//      * Prints the stack trace of the specified Exception to stderr and calls
//      * {@link org.junit.Assert#fail(String)} in order to fail the test in which
//      * this method is called.
//      * 
//      * @param exception
//      *            The Exception which caused the test failure.
//      */
//     public static synchronized void fail(final Throwable exception) {
//         exception.printStackTrace(System.err);
//         org.junit.Assert.fail(exception.getMessage());
//     }
// 
//     /**
//      * Fails the test in which this method is called with the message that an
//      * Exception should have been thrown on the previous line.
//      */
//     public static void shouldHaveThrownException() {
//         org.junit.Assert.fail(EXCEPTION_MSG);
//     }
// 
//     /** Instantiation disallowed. */
//     private TestUtils() {
//         // intentionally unimplemented
//     }
// }
// 
// Path: src/main/java/analyticalengine/cards/BadCard.java
// public class BadCard extends CardException {
// 
//     /**
//      * A default generated serial version UID.
//      */
//     private static final long serialVersionUID = -3311831632309378417L;
// 
//     /**
//      * Instantiates this exception with the specified error message and the
//      * specified card that caused the exception.
//      * 
//      * @param message
//      *            The error message.
//      * @param cause
//      *            The card that caused this exception.
//      */
//     public BadCard(final String message, final Card cause) {
//         super(message, cause);
//     }
// 
//     /**
//      * Instantiates this exception with the specified error message, card that
//      * caused the exception, and exception that caused the exception.
//      * 
//      * @param message
//      *            The error message.
//      * @param cardCause
//      *            The card that caused the exception.
//      * @param throwableCause
//      *            The throwable that caused this exception.
//      */
//     public BadCard(final String message, final Card cardCause,
//             final Throwable throwableCause) {
//         super(message, cardCause, throwableCause);
//     }
// 
// }
// 
// Path: src/main/java/analyticalengine/cards/UnknownCard.java
// public class UnknownCard extends Exception {
// 
//     /**
//      * A default generated serial version UID.
//      */
//     private static final long serialVersionUID = -5748344376227284027L;
// 
//     /**
//      * Creates a new exception with the specified error message.
//      * 
//      * @param string
//      *            The error message.
//      */
//     public UnknownCard(final String string) {
//         super(string);
//     }
// 
// }


// Path: src/test/java/analyticalengine/attendant/DefaultAttendantTest.java
import analyticalengine.cards.UnknownCard;
import java.io.BufferedWriter;
import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.file.Files;
import java.nio.file.Path;
import org.junit.Test;
import analyticalengine.TestUtils;
import analyticalengine.cards.BadCard;

/**
 * DefaultAttendantTest.java -
 * 
 * Copyright 2014-2016 Jeffrey Finkelstein.
 * 
 * This file is part of analyticalengine.
 * 
 * analyticalengine 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.
 * 
 * analyticalengine 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
 * analyticalengine. If not, see <http://www.gnu.org/licenses/>.
 */
package analyticalengine.attendant;




/**
 * Unit tets for the default attendant implementation.
 * 
 * @author Jeffrey Finkelstein &lt;jeffrey.finkelstein@gmail.com&gt;
 * @since 0.0.1
 */
public class DefaultAttendantTest extends AttendantTestBase {

    /**
     * Tests for attempting to load an unknown library file.
     * 
     * @throws IOException
     * @throws UnknownCard
     * @throws BadCard
     */
    @Test
    public void testUnknownLibraryFile()
            throws BadCard, UnknownCard, IOException {
        try {