You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rya.apache.org by mi...@apache.org on 2017/08/04 13:37:50 UTC

[6/7] incubator-rya git commit: RYA-325 Renamed rya.console to rya.shell. Closes #194

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/main/java/org/apache/rya/shell/util/ConnectorFactory.java
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/main/java/org/apache/rya/shell/util/ConnectorFactory.java b/extras/rya.console/src/main/java/org/apache/rya/shell/util/ConnectorFactory.java
deleted file mode 100644
index d18c5c8..0000000
--- a/extras/rya.console/src/main/java/org/apache/rya/shell/util/ConnectorFactory.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.rya.shell.util;
-
-import static java.util.Objects.requireNonNull;
-
-import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
-import edu.umd.cs.findbugs.annotations.NonNull;
-
-import org.apache.accumulo.core.client.AccumuloException;
-import org.apache.accumulo.core.client.AccumuloSecurityException;
-import org.apache.accumulo.core.client.Connector;
-import org.apache.accumulo.core.client.Instance;
-import org.apache.accumulo.core.client.ZooKeeperInstance;
-import org.apache.accumulo.core.client.security.tokens.PasswordToken;
-
-/**
- * Creates {@link Connector}s that are linked to an instance of Accumulo.
- */
-@DefaultAnnotation(NonNull.class)
-public class ConnectorFactory {
-
-    /**
-     * Create a {@link Connector} that uses the provided connection details.
-     *
-     * @param username - The username the connection will use. (not null)
-     * @param password - The password the connection will use. (not null)
-     * @param instanceName - The name of the Accumulo instance. (not null)
-     * @param zookeeperHostnames - A comma delimited list of the Zookeeper server hostnames. (not null)
-     * @return A {@link Connector} that may be used to access the instance of Accumulo.
-     * @throws AccumuloSecurityException Could not connect for security reasons.
-     * @throws AccumuloException Could not connect for other reasons.
-     */
-    public Connector connect(
-            final String username,
-            final CharSequence password,
-            final String instanceName,
-            final String zookeeperHostnames) throws AccumuloException, AccumuloSecurityException {
-        requireNonNull(username);
-        requireNonNull(password);
-        requireNonNull(instanceName);
-        requireNonNull(zookeeperHostnames);
-
-        // Setup the password token that will be used.
-        final PasswordToken token = new PasswordToken( password );
-
-        // Connect to the instance of Accumulo.
-        final Instance instance = new ZooKeeperInstance(instanceName, zookeeperHostnames);
-        return instance.getConnector(username, token);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/main/java/org/apache/rya/shell/util/ConsolePrinter.java
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/main/java/org/apache/rya/shell/util/ConsolePrinter.java b/extras/rya.console/src/main/java/org/apache/rya/shell/util/ConsolePrinter.java
deleted file mode 100644
index 4492a87..0000000
--- a/extras/rya.console/src/main/java/org/apache/rya/shell/util/ConsolePrinter.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.rya.shell.util;
-
-import java.io.IOException;
-
-import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
-import edu.umd.cs.findbugs.annotations.NonNull;
-import jline.console.ConsoleReader;
-
-/**
- * A mechanism for printing content to the console.
- */
-@DefaultAnnotation(NonNull.class)
-public interface ConsolePrinter {
-
-    /**
-     * Prints the provided content to the console.
-     * @param cs - Output the specified String to the console.
-     * @throws IOException There was a problem reading the user's input.
-     */
-    public void print(CharSequence cs) throws IOException;
-
-    /**
-     * Prints the provided content to the console with a newline.
-     * @param cs - Output the specified String to the console.
-     * @throws IOException There was a problem reading the user's input.
-     */
-    public void println(CharSequence cs) throws IOException;
-
-    /**
-     * Prints a newline.
-     * @throws IOException There was a problem reading the user's input.
-     */
-    public void println() throws IOException;
-
-    /**
-     * Flush any pending console updates to the console output stream.
-     * @throws IOException
-     */
-    public void flush() throws IOException;
-
-    /**
-     * Prints to the console using a JLine {@link ConsoleReader}.
-     */
-    @DefaultAnnotation(NonNull.class)
-    public static class JLineConsolePrinter extends JLinePrompt implements ConsolePrinter {
-
-        @Override
-        public void print(final CharSequence cs) throws IOException {
-            getReader().print(cs);
-        }
-
-        @Override
-        public void println(final CharSequence cs) throws IOException {
-            getReader().println(cs);
-        }
-
-        @Override
-        public void println() throws IOException {
-            getReader().println();
-        }
-
-        @Override
-        public void flush() throws IOException {
-            getReader().flush();
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/main/java/org/apache/rya/shell/util/InstallPrompt.java
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/main/java/org/apache/rya/shell/util/InstallPrompt.java b/extras/rya.console/src/main/java/org/apache/rya/shell/util/InstallPrompt.java
deleted file mode 100644
index 5d9d48b..0000000
--- a/extras/rya.console/src/main/java/org/apache/rya/shell/util/InstallPrompt.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.rya.shell.util;
-
-import java.io.IOException;
-
-import org.apache.rya.api.client.Install.InstallConfiguration;
-
-import com.google.common.base.Optional;
-
-import jline.console.ConsoleReader;
-
-/**
- * A mechanism for prompting a user of the application for a the parameters
- * that will be used when installing an instance of Rya.
- */
-public interface InstallPrompt {
-
-    /**
-     * Prompt the user for the name of the Rya instance that will be created.
-     *
-     * @return The value they entered.
-     * @throws IOException There was a problem reading the value.
-     */
-    public String promptInstanceName() throws IOException;
-
-    /**
-     * Prompt the user for which features of Rya they want enabled.
-     *
-     * @param instanceName - The Rya instance name.
-     * @return The value they entered.
-     * @throws IOException There was a problem reading the values.
-     */
-    public InstallConfiguration promptInstallConfiguration(String instanceName) throws IOException;
-
-    /**
-     * Prompt the user asking them if they are sure they would like to do the
-     * install.
-     *
-     * @return The value they entered.
-     * @throws IOException There was a problem reading the value.
-     */
-    public boolean promptVerified(String instanceName, InstallConfiguration installConfig) throws IOException;
-
-    /**
-     * Prompts a user for install information using a JLine {@link ConsoleReader}.
-     */
-    public static class JLineAccumuloInstallPrompt extends JLinePrompt implements InstallPrompt {
-
-        @Override
-        public String promptInstanceName() throws IOException {
-            final String prompt = makeFieldPrompt("Rya Instance Name", "rya_");
-            final String instanceName = promptString(prompt, Optional.of("rya_"));
-            return instanceName;
-        }
-
-        @Override
-        public InstallConfiguration promptInstallConfiguration(final String instanceName) throws IOException {
-            final InstallConfiguration.Builder builder = InstallConfiguration.builder();
-
-            String prompt = makeFieldPrompt("Use Shard Balancing (improves streamed input write speeds)", false);
-            final boolean enableTableHashPrefix = promptBoolean(prompt, Optional.of(false));
-            builder.setEnableTableHashPrefix( enableTableHashPrefix );
-
-            prompt = makeFieldPrompt("Use Entity Centric Indexing", true);
-            final boolean enableEntityCentricIndexing = promptBoolean(prompt, Optional.of(true));
-            builder.setEnableEntityCentricIndex( enableEntityCentricIndexing );
-
-            prompt = makeFieldPrompt("Use Free Text Indexing", true);
-            final boolean enableFreeTextIndexing = promptBoolean(prompt, Optional.of(true));
-            builder.setEnableFreeTextIndex( enableFreeTextIndexing );
-
-            prompt = makeFieldPrompt("Use Geospatial Indexing", true);
-            final boolean enableGeoIndexing = promptBoolean(prompt, Optional.of(true));
-            builder.setEnableGeoIndex( enableGeoIndexing );
-
-            prompt = makeFieldPrompt("Use Temporal Indexing", true);
-            final boolean useTemporalIndexing = promptBoolean(prompt, Optional.of(true));
-            builder.setEnableTemporalIndex( useTemporalIndexing );
-
-            prompt = makeFieldPrompt("Use Precomputed Join Indexing", true);
-            final boolean enablePCJIndexing = promptBoolean(prompt, Optional.of(true));
-            builder.setEnablePcjIndex( enablePCJIndexing );
-
-            if(enablePCJIndexing) {
-                final boolean useFluoApp = promptBoolean("Use a Fluo application to update the PCJ Index? (y/n) ", Optional.absent());
-
-                if(useFluoApp) {
-                    prompt = makeFieldPrompt("PCJ Updater Fluo Application Name (must be initialized)", instanceName + "pcj_updater");
-                    final String fluoAppName = promptString(prompt, Optional.of(instanceName + "pcj_updater"));
-                    builder.setFluoPcjAppName(fluoAppName);
-                }
-            }
-
-            return builder.build();
-        }
-
-        @Override
-        public boolean promptVerified(final String instanceName, final InstallConfiguration installConfig) throws IOException {
-            final ConsoleReader reader = getReader();
-            reader.println();
-            reader.println("A Rya instance will be installed using the following values:");
-            reader.println("   Instance Name: " + instanceName);
-            reader.println("   Use Shard Balancing: " + installConfig.isTableHashPrefixEnabled());
-            reader.println("   Use Entity Centric Indexing: " + installConfig.isEntityCentrixIndexEnabled());
-            reader.println("   Use Free Text Indexing: " + installConfig.isFreeTextIndexEnabled());
-            reader.println("   Use Geospatial Indexing: " + installConfig.isGeoIndexEnabled());
-            reader.println("   Use Temporal Indexing: " + installConfig.isTemporalIndexEnabled());
-            reader.println("   Use Precomputed Join Indexing: " + installConfig.isPcjIndexEnabled());
-            if(installConfig.isPcjIndexEnabled()) {
-                if(installConfig.getFluoPcjAppName().isPresent()) {
-                    reader.println("   PCJ Updater Fluo Application Name: " + installConfig.getFluoPcjAppName().get());
-                } else {
-                    reader.println("   Not using a PCJ Updater Fluo Application");
-                }
-            }
-
-            reader.println("");
-
-            return promptBoolean("Continue with the install? (y/n) ", Optional.absent());
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/main/java/org/apache/rya/shell/util/InstanceNamesFormatter.java
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/main/java/org/apache/rya/shell/util/InstanceNamesFormatter.java b/extras/rya.console/src/main/java/org/apache/rya/shell/util/InstanceNamesFormatter.java
deleted file mode 100644
index f50164b..0000000
--- a/extras/rya.console/src/main/java/org/apache/rya/shell/util/InstanceNamesFormatter.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.rya.shell.util;
-
-import static java.util.Objects.requireNonNull;
-
-import java.util.List;
-
-import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
-import edu.umd.cs.findbugs.annotations.NonNull;
-
-/**
- * Pretty formats a list of Rya instance names.
- */
-@DefaultAnnotation(NonNull.class)
-public class InstanceNamesFormatter {
-
-    /**
-     * Formats the list of Rya instance names with a '*' next to whichever entry
-     * matches the connected name.
-     *
-     * @param names - The Rya instance names. (not null)
-     * @param connectedName - The instance name that will have a '*' next to it. (not null)
-     * @return A string holding the pretty formatted list.
-     */
-    public String format(final List<String> names, final String connectedName) {
-        requireNonNull(names);
-        requireNonNull(connectedName);
-
-        // Will be -1 if the connected name isn't in the list of names, so none will be starred.
-        final int connectedIndex = names.indexOf( connectedName );
-
-        final StringBuilder formatted = new StringBuilder("Rya instance names:\n");
-        for(int i = 0; i < names.size(); i++) {
-            if(i == connectedIndex) {
-                formatted.append(" * ");
-            } else {
-                formatted.append("   ");
-            }
-            formatted.append( names.get(i) ).append("\n");
-        }
-
-        return formatted.toString();
-    }
-
-    /**
-     * Formats the list of Rya instance names.
-     *
-     * @param names - The Rya instance names. (not null)
-     * @return A string holding the pretty formatted list.
-     */
-    public String format(final List<String> names) {
-        requireNonNull(names);
-
-        final StringBuilder formatted = new StringBuilder("Rya instance names:\n");
-        for(int i = 0; i < names.size(); i++) {
-            formatted.append("   ").append( names.get(i) ).append("\n");
-        }
-
-        return formatted.toString();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/main/java/org/apache/rya/shell/util/JLinePrompt.java
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/main/java/org/apache/rya/shell/util/JLinePrompt.java b/extras/rya.console/src/main/java/org/apache/rya/shell/util/JLinePrompt.java
deleted file mode 100644
index a259593..0000000
--- a/extras/rya.console/src/main/java/org/apache/rya/shell/util/JLinePrompt.java
+++ /dev/null
@@ -1,211 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.rya.shell.util;
-
-import static java.util.Objects.requireNonNull;
-
-import java.io.IOException;
-import java.util.Set;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.util.FieldUtils;
-import org.springframework.shell.core.Shell;
-
-import com.google.common.base.Optional;
-import com.google.common.collect.Sets;
-
-import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
-import edu.umd.cs.findbugs.annotations.NonNull;
-import jline.console.ConsoleReader;
-
-/**
- * Provides access to the host {@link Shell}'s {@link ConsoleReader} and some
- * utility functions for using it.
- */
-@DefaultAnnotation(NonNull.class)
-public abstract class JLinePrompt {
-
-    /**
-     * Defines things that may be typed in response to a boolean prompt that evaluate to true.
-     */
-    private static final Set<String> affirmativeStrings = Sets.newHashSet("true", "t", "yes", "y");
-
-    /**
-     * Defines things that may be typed in response to a boolean prompt that evaluate to false.
-     */
-    private static final Set<String> negativeStrings = Sets.newHashSet("false", "f", "no", "n");
-
-    @Autowired
-    private Shell shell;
-
-    /**
-     * @return The shell's {@link ConsoleReader}.
-     */
-    public ConsoleReader getReader() {
-        // XXX Spring Shell doesn't expose the reader that we need to use to
-        //     read values from a terminal, so use reflection to pull it out.
-        return (ConsoleReader) FieldUtils.getProtectedFieldValue("reader", shell);
-    }
-
-    /**
-     * Formats a prompt that shows a default value.
-     *
-     * @param fieldName - The text portion that appears before the default. (not null)
-     * @param defaultValue - The default value that will be shown in the prompt.
-     * @return A prompt that shows the default value for a field.
-     */
-    public String makeFieldPrompt(final String fieldName, final boolean defaultValue) {
-    	return makeFieldPrompt(fieldName, Boolean.toString(defaultValue));
-    }
-
-    /**
-     * Formats a prompt that shows a default value.
-     *
-     * @param fieldName - The text portion that appears before the default. (not null)
-     * @param defaultValue - The default value that will be shown in the prompt.
-     * @return A prompt that shows the default value for a field.
-     */
-    public String makeFieldPrompt(final String fieldName, final String defaultValue) {
-        return String.format("%s [default: %s]: ", fieldName, defaultValue);
-    }
-
-    /**
-     * Checks if a user's input matches one of the affirmative strings.
-     *
-     * @param input - The user's input. (not null)
-     * @return {@code true} if the input is one of the affirmative values; otherwise {@code false}.
-     */
-    private boolean isAffirmative(final String input) {
-        requireNonNull(input);
-        for(final String affirmativeString : affirmativeStrings) {
-            if( input.equalsIgnoreCase(affirmativeString) ) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
-     * Checks if a user's input matches one of the negative strings.
-     *
-     * @param input - The user's input. (not null)
-     * @return {@code true} if the input is one of the negative values; otherwise {@code false}.
-     */
-    private boolean isNegative(final String input) {
-        requireNonNull(input);
-        for(final String negativeString : negativeStrings) {
-            if( input.equalsIgnoreCase(negativeString) ) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
-     * Prompts a user for a boolean value. The prompt will be repeated until
-     * a value true/false string has been submitted. If a default value is
-     * provided, then it will be used if the user doens't enter anything.
-     *
-     * @param prompt - The prompt for the input. (not null)
-     * @param defaultValue - The default value for the input if one is provided. (not null)
-     * @return The value the user entered.
-     * @throws IOException There was a problem reading values from the user.
-     */
-    protected boolean promptBoolean(final String prompt, final Optional<Boolean> defaultValue) throws IOException {
-        requireNonNull(prompt);
-        requireNonNull(defaultValue);
-
-        final ConsoleReader reader = getReader();
-        reader.setPrompt(prompt);
-
-        Boolean value = null;
-        boolean prompting = true;
-
-        while(prompting) {
-            // An empty input means to use the default value.
-            final String input = reader.readLine();
-            if(input.isEmpty() && defaultValue.isPresent()) {
-                value = defaultValue.get();
-                prompting = false;
-            }
-
-            // Check if it is one of the affirmative answers.
-            if(isAffirmative(input)) {
-                value = true;
-                prompting = false;
-            }
-
-            // Check if it is one of the negative answers.
-            if(isNegative(input)) {
-                value = false;
-                prompting = false;
-            }
-
-            // If we are still prompting, the input was invalid.
-            if(prompting) {
-                reader.println("Invalid response (true/false)");
-            }
-        }
-
-        return value;
-    }
-
-    /**
-     * Prompts a user for a String value. The prompt will be repeated until a
-     * value has been submitted. If a default value is provided, then it will be
-     * used if the user doesn't enter anything.
-     *
-     * @param prompt - The prompt for the input. (not null)
-     * @param defaultValue - The default value for the input if one is provided. (not null)
-     * @return The value the user entered.
-     * @throws IOException There was a problem reading values from the user.
-     */
-    protected String promptString(final String prompt, final Optional<String> defaultValue) throws IOException {
-        requireNonNull(prompt);
-        requireNonNull(defaultValue);
-
-        final ConsoleReader reader = getReader();
-        reader.setPrompt(prompt);
-
-        String value = null;
-        boolean prompting = true;
-
-        while(prompting) {
-            // Read a line of input.
-            final String input = reader.readLine();
-
-            if(!input.isEmpty()) {
-                // If a value was provided, return it.
-                value = input;
-                prompting = false;
-            } else {
-                // Otherwise, if a default value was provided, return it;
-                if(defaultValue.isPresent()) {
-                    value = defaultValue.get();
-                    prompting = false;
-                } else {
-                    // Otherwise, the user must provide a value.
-                    reader.println("Invalid response. Must provide a value.");
-                }
-            }
-        }
-
-        return value;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/main/java/org/apache/rya/shell/util/PasswordPrompt.java
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/main/java/org/apache/rya/shell/util/PasswordPrompt.java b/extras/rya.console/src/main/java/org/apache/rya/shell/util/PasswordPrompt.java
deleted file mode 100644
index b61faf9..0000000
--- a/extras/rya.console/src/main/java/org/apache/rya/shell/util/PasswordPrompt.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.rya.shell.util;
-
-import java.io.IOException;
-
-import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
-import edu.umd.cs.findbugs.annotations.NonNull;
-
-import jline.console.ConsoleReader;
-
-/**
- * A mechanism for prompting a user of the application for a password.
- */
-@DefaultAnnotation(NonNull.class)
-public interface PasswordPrompt {
-
-    /**
-     * Prompt the user for a password, wait for their input, and then get the
-     * value they entered.
-     *
-     * @return A character array holding the entered password.
-     * @throws IOEXception There was a problem reading the password.
-     */
-    public char[] getPassword() throws IOException;
-
-    /**
-     * Prompts a user for their password using a JLine {@link ConsoleReader}.
-     * <p>
-     * This prompt has a known security issue. ConsoleReader only reads passwords
-     * into Strings, so they can't easily be cleared out. We many an attempt to
-     * garbage collect the String after converting it to a character array, but
-     * this could be improved.
-     */
-    public static class JLinePasswordPrompt extends JLinePrompt implements PasswordPrompt {
-
-        @Override
-        public char[] getPassword() throws IOException {
-            char[] password = new char[0];
-
-            final ConsoleReader reader = getReader();
-            reader.setPrompt("Password: ");
-            String passwordStr = reader.readLine('*');
-            password = passwordStr.toCharArray();
-
-            // Reading the password into memory as a String is less safe than a char[]
-            // because the String is immutable. We can't clear it out. At best, we can
-            // remove all references to it and suggest the GC clean it up. There are no
-            // guarantees though.
-            passwordStr = null;
-            System.gc();
-
-            return password;
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/main/java/org/apache/rya/shell/util/RyaDetailsFormatter.java
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/main/java/org/apache/rya/shell/util/RyaDetailsFormatter.java b/extras/rya.console/src/main/java/org/apache/rya/shell/util/RyaDetailsFormatter.java
deleted file mode 100644
index dace754..0000000
--- a/extras/rya.console/src/main/java/org/apache/rya/shell/util/RyaDetailsFormatter.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.rya.shell.util;
-
-import static java.util.Objects.requireNonNull;
-
-import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
-import edu.umd.cs.findbugs.annotations.NonNull;
-
-import org.apache.rya.api.instance.RyaDetails;
-import org.apache.rya.api.instance.RyaDetails.PCJIndexDetails;
-import org.apache.rya.api.instance.RyaDetails.PCJIndexDetails.PCJDetails;
-
-import com.google.common.base.Joiner;
-import com.google.common.base.Optional;
-import com.google.common.collect.ImmutableMap;
-
-/**
- * Formats an instance of {@link RyaDetails}.
- */
-@DefaultAnnotation(NonNull.class)
-public class RyaDetailsFormatter {
-
-    /**
-     * Pretty formats an instance of {@link RyaDetails}.
-     *
-     * @param details - The object to format. (not null)
-     * @return A pretty render of the object.
-     */
-    public String format(final RyaDetails details) {
-        requireNonNull(details);
-
-        final StringBuilder report = new StringBuilder();
-
-        report.append("General Metadata:\n");
-        report.append("  Instance Name: ").append(details.getRyaInstanceName()).append("\n");
-        report.append("  RYA Version: ").append( details.getRyaVersion() ).append("\n");
-        report.append("  Users: ").append( Joiner.on(", ").join(details.getUsers()) ).append("\n");
-
-        report.append("Secondary Indicies:\n");
-        report.append("  Entity Centric Index:\n");
-        report.append("    Enabled: ").append( details.getEntityCentricIndexDetails().isEnabled() ).append("\n");
-      //RYA-215        report.append("  Geospatial Index:\n");
-      //RYA-215        report.append("    Enabled: ").append( details.getGeoIndexDetails().isEnabled() ).append("\n");
-        report.append("  Free Text Index:\n");
-        report.append("    Enabled: ").append( details.getFreeTextIndexDetails().isEnabled() ).append("\n");
-        report.append("  Temporal Index:\n");
-        report.append("    Enabled: ").append( details.getTemporalIndexDetails().isEnabled() ).append("\n");
-
-        report.append("  PCJ Index:\n");
-        final PCJIndexDetails pcjDetails = details.getPCJIndexDetails();
-        report.append("    Enabled: ").append( pcjDetails.isEnabled() ).append("\n");
-        if(pcjDetails.isEnabled()) {
-            if(pcjDetails.getFluoDetails().isPresent()) {
-                final String fluoAppName = pcjDetails.getFluoDetails().get().getUpdateAppName();
-                report.append("    Fluo App Name: ").append(fluoAppName).append("\n");
-            }
-
-            final ImmutableMap<String, PCJDetails> pcjs = pcjDetails.getPCJDetails();
-            report.append("    PCJs:\n");
-            if(pcjs.isEmpty()) {
-                report.append("      No PCJs have been added yet.\n");
-            } else {
-                for(final PCJDetails pcj : pcjs.values()) {
-                    report.append("      ID: ").append(pcj.getId()).append("\n");
-
-                    final String updateStrategy = format( pcj.getUpdateStrategy(), "None" );
-                    report.append("        Update Strategy: ").append(updateStrategy).append("\n");
-
-                    final String lastUpdateTime = format( pcj.getLastUpdateTime(), "unavailable");
-                    report.append("        Last Update Time: ").append(lastUpdateTime).append("\n");
-                }
-            }
-        }
-
-        report.append("Statistics:\n");
-        report.append("  Prospector:\n");
-        final String prospectorLastUpdateTime = format(details.getProspectorDetails().getLastUpdated(), "unavailable");
-        report.append("    Last Update Time: ").append( prospectorLastUpdateTime).append("\n");
-
-        report.append("  Join Selectivity:\n");
-        final String jsLastUpdateTime = format(details.getJoinSelectivityDetails().getLastUpdated(), "unavailable");
-        report.append("    Last Updated Time: ").append( jsLastUpdateTime ).append("\n");
-
-        return report.toString();
-    }
-
-    /**
-     * Formats an optional value using the value's toString() value.
-     *
-     * @param value - The optional value that will be formatted. (not null)
-     * @param absentValue - The String that will be returned if the optional is absent. (not null)
-     * @return The String representation of the optional value.
-     */
-    private <T> String format(final Optional<T> value, final String absentValue) {
-        requireNonNull(value);
-
-        String formatted = "unavailable";
-        if(value.isPresent()) {
-            formatted = value.get().toString();
-        }
-        return formatted;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/main/java/org/apache/rya/shell/util/SparqlPrompt.java
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/main/java/org/apache/rya/shell/util/SparqlPrompt.java b/extras/rya.console/src/main/java/org/apache/rya/shell/util/SparqlPrompt.java
deleted file mode 100644
index 2574eea..0000000
--- a/extras/rya.console/src/main/java/org/apache/rya/shell/util/SparqlPrompt.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.rya.shell.util;
-
-import java.io.IOException;
-
-import com.google.common.base.Optional;
-
-import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
-import edu.umd.cs.findbugs.annotations.NonNull;
-import jline.console.ConsoleReader;
-
-/**
- * A mechanism for prompting a user of the application for a SPARQL string.
- */
-@DefaultAnnotation(NonNull.class)
-public interface SparqlPrompt {
-
-    /**
-     * Prompt the user for a SPARQL query, wait for their input, and then get the value they entered.
-     *
-     * @return The user entered SPARQL query, or an empty string if the user aborts.
-     * @throws IOException There was a problem reading the user's input.
-     */
-    public Optional<String> getSparql() throws IOException;
-
-    /**
-     * Prompts a user for a SPARQL query using a JLine {@link ConsoleReader}.
-     */
-    @DefaultAnnotation(NonNull.class)
-    public static class JLineSparqlPrompt extends JLinePrompt implements SparqlPrompt {
-
-        private final String EXECUTE_COMMAND = "\\e";
-        private final String CLEAR_COMMAND = "\\c";
-
-        @Override
-        public Optional<String> getSparql() throws IOException {
-            final ConsoleReader reader = getReader();
-            reader.setCopyPasteDetection(true); // disable tab completion from activating
-            reader.setHistoryEnabled(false);    // don't store SPARQL fragments in the command history
-            try {
-                reader.println("Enter a SPARQL Query.");
-                reader.println("Type '" + EXECUTE_COMMAND + "' to execute the current query.");
-                reader.println("Type '" + CLEAR_COMMAND + "' to clear the current query.");
-                reader.flush();
-
-                final StringBuilder sb = new StringBuilder();
-                String line = reader.readLine("SPARQL> ");
-                while (!line.endsWith(CLEAR_COMMAND) && !line.endsWith(EXECUTE_COMMAND)) {
-                    sb.append(line).append("\n");
-                    line = reader.readLine("     -> ");
-                }
-
-                if (line.endsWith(EXECUTE_COMMAND)) {
-                    sb.append(line.substring(0, line.length() - EXECUTE_COMMAND.length()));
-                    return Optional.of(sb.toString());
-                }
-                return Optional.absent();
-            } finally {
-                reader.setHistoryEnabled(true);      // restore the ConsoleReader's settings
-                reader.setCopyPasteDetection(false); // restore tab completion
-            }
-        }
-    }
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/main/java/org/apache/rya/shell/util/UninstallPrompt.java
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/main/java/org/apache/rya/shell/util/UninstallPrompt.java b/extras/rya.console/src/main/java/org/apache/rya/shell/util/UninstallPrompt.java
deleted file mode 100644
index 628727c..0000000
--- a/extras/rya.console/src/main/java/org/apache/rya/shell/util/UninstallPrompt.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.rya.shell.util;
-
-import static java.util.Objects.requireNonNull;
-
-import java.io.IOException;
-
-import com.google.common.base.Optional;
-
-import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
-import edu.umd.cs.findbugs.annotations.NonNull;
-import jline.console.ConsoleReader;
-
-/**
- * A mechanism for prompting a user of the application to ensure they want to
- * uninstall an instance of Rya.
- */
-@DefaultAnnotation(NonNull.class)
-public interface UninstallPrompt {
-
-    /**
-     * Prompt the user to make sure they want to uninstall the instance of Rya.
-     *
-     * @param ryaInstanceName - The name of the Rya instance being prompted for. (not null)
-     * @return The value they entered.
-     * @throws IOException There was a problem reading the values.
-     */
-    public boolean promptAreYouSure(final String ryaInstanceName) throws IOException;
-
-    /**
-     * Prompts a user for uninstall information using a JLine {@link ConsoleReader}.
-     */
-    public static class JLineUninstallPrompt extends JLinePrompt implements UninstallPrompt {
-        @Override
-        public boolean promptAreYouSure(final String ryaInstanceName) throws IOException {
-            requireNonNull(ryaInstanceName);
-            return promptBoolean("Are you sure you want to uninstall this instance of Rya named '" +
-                    ryaInstanceName + "'? ", Optional.<Boolean>absent());
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/main/resources/LICENSE.txt
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/main/resources/LICENSE.txt b/extras/rya.console/src/main/resources/LICENSE.txt
deleted file mode 100644
index 4a9fe83..0000000
--- a/extras/rya.console/src/main/resources/LICENSE.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
- 
-    http://www.apache.org/licenses/LICENSE-2.0
- 
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/main/resources/META-INF/spring/spring-shell-plugin.xml
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/main/resources/META-INF/spring/spring-shell-plugin.xml b/extras/rya.console/src/main/resources/META-INF/spring/spring-shell-plugin.xml
deleted file mode 100644
index 48c4846..0000000
--- a/extras/rya.console/src/main/resources/META-INF/spring/spring-shell-plugin.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-    Licensed to the Apache Software Foundation (ASF) under one
-    or more contributor license agreements.  See the NOTICE file
-    distributed with this work for additional information
-    regarding copyright ownership.  The ASF licenses this file
-    to you under the Apache License, Version 2.0 (the
-    "License"); you may not use this file except in compliance
-    with the License.  You may obtain a copy of the License at
-
-        http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing,
-    software distributed under the License is distributed on an
-    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-    KIND, either express or implied.  See the License for the
-    specific language governing permissions and limitations
-    under the License.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xmlns:context="http://www.springframework.org/schema/context"
-	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
-		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">
-
-    <!-- Tell Spring where it can find all of the Command components. -->
-    <context:component-scan base-package="org.apache.rya.shell"/>
-
-    <!-- Define the shell state bean that will be shared across all of the commands. -->
-    <bean id="sharedShellState" class="org.apache.rya.shell.SharedShellState" />
-    <bean id="passwordPrompt" class="org.apache.rya.shell.util.PasswordPrompt.JLinePasswordPrompt" />
-    <bean id="installPrompt" class="org.apache.rya.shell.util.InstallPrompt.JLineAccumuloInstallPrompt" />
-    <bean id="uninstallPrompt" class="org.apache.rya.shell.util.UninstallPrompt.JLineUninstallPrompt" />
-    <bean id="sparqlPrompt" class="org.apache.rya.shell.util.SparqlPrompt.JLineSparqlPrompt" />
-    <bean id="consolePrinter" class="org.apache.rya.shell.util.ConsolePrinter.JLineConsolePrinter" />
-    
-    <!-- Define each of the beans that hold onto commands used by the shell. -->
-    <bean id="ryaConnectionCommands" class="org.apache.rya.shell.RyaConnectionCommands" />
-    <bean id="ryaAdminCommands" class="org.apache.rya.shell.RyaAdminCommands" />
-    <bean id="ryaCommands" class="org.apache.rya.shell.RyaCommands" />
-    
-    <!--  
-    <bean id="springHelpCommands" class="org.springframework.shell.commands.HelpCommands" />
-    <bean id="springScriptCommands" class="org.springframework.shell.commands.ScriptCommands" />
-    <bean id="springExitCommands" class="org.springframework.shell.commands.ExitCommands" />
-    -->
-    
-</beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/main/scripts/rya
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/main/scripts/rya b/extras/rya.console/src/main/scripts/rya
deleted file mode 100644
index 5280286..0000000
--- a/extras/rya.console/src/main/scripts/rya
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/bash
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-
-PROJECT_HOME=$(dirname $(cd $(dirname $0) && pwd))
-#cd $PROJECT_HOME
-
-java -cp $PROJECT_HOME/lib/${project.artifactId}-${project.version}-shaded.jar \
-  -Drya.shell.home="${PROJECT_HOME}/" \
-  -Dlog4j.configuration="file://$PROJECT_HOME/conf/log4j.properties" \
-  org.springframework.shell.Bootstrap "$@"
-  
-# --profiles - Specifies values for the system property spring.profiles.active so that Spring 3.1 and greater profile support is enabled.
-# --cmdfile - Specifies a file to read that contains shell commands
-# --histsize - Specifies the maximum number of lines to store in the command history file. Default value is 3000.
-# --disableInternalCommands - Flag that disables all commands that would be pre-registered with the shell. There is no argument to this option. You can selectively add back any internal commands by referencing them in your shell plugin file. Look at the Spring Shell javadocs for specific commands located in the org.springframework.shell.commands package as well as the section in this documentation of Built in commands.

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/test/java/org/apache/rya/shell/RyaAdminCommandsTest.java
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/test/java/org/apache/rya/shell/RyaAdminCommandsTest.java b/extras/rya.console/src/test/java/org/apache/rya/shell/RyaAdminCommandsTest.java
deleted file mode 100644
index e3e8d98..0000000
--- a/extras/rya.console/src/test/java/org/apache/rya/shell/RyaAdminCommandsTest.java
+++ /dev/null
@@ -1,474 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.rya.shell;
-
-import static org.junit.Assert.assertEquals;
-import static org.mockito.Matchers.eq;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import java.io.IOException;
-import java.util.Date;
-import java.util.List;
-import java.util.TimeZone;
-
-import org.apache.rya.api.client.AddUser;
-import org.apache.rya.api.client.CreatePCJ;
-import org.apache.rya.api.client.DeletePCJ;
-import org.apache.rya.api.client.GetInstanceDetails;
-import org.apache.rya.api.client.Install;
-import org.apache.rya.api.client.Install.DuplicateInstanceNameException;
-import org.apache.rya.api.client.Install.InstallConfiguration;
-import org.apache.rya.api.client.InstanceDoesNotExistException;
-import org.apache.rya.api.client.ListInstances;
-import org.apache.rya.api.client.RemoveUser;
-import org.apache.rya.api.client.RyaClient;
-import org.apache.rya.api.client.RyaClientException;
-import org.apache.rya.api.client.Uninstall;
-import org.apache.rya.api.client.accumulo.AccumuloConnectionDetails;
-import org.apache.rya.api.instance.RyaDetails;
-import org.apache.rya.api.instance.RyaDetails.EntityCentricIndexDetails;
-import org.apache.rya.api.instance.RyaDetails.FreeTextIndexDetails;
-import org.apache.rya.api.instance.RyaDetails.JoinSelectivityDetails;
-import org.apache.rya.api.instance.RyaDetails.PCJIndexDetails;
-import org.apache.rya.api.instance.RyaDetails.PCJIndexDetails.FluoDetails;
-import org.apache.rya.api.instance.RyaDetails.PCJIndexDetails.PCJDetails;
-import org.apache.rya.api.instance.RyaDetails.PCJIndexDetails.PCJDetails.PCJUpdateStrategy;
-import org.apache.rya.api.instance.RyaDetails.ProspectorDetails;
-import org.apache.rya.api.instance.RyaDetails.TemporalIndexDetails;
-import org.apache.rya.shell.util.InstallPrompt;
-import org.apache.rya.shell.util.SparqlPrompt;
-import org.apache.rya.shell.util.UninstallPrompt;
-import org.junit.Test;
-
-import com.google.common.base.Optional;
-import com.google.common.collect.Lists;
-
-/**
- * Unit tests the methods of {@link RyaAdminCommands}.
- */
-public class RyaAdminCommandsTest {
-
-    @Test
-    public void createPCJ() throws InstanceDoesNotExistException, RyaClientException, IOException {
-        // Mock the object that performs the create operation.
-        final String instanceName = "unitTest";
-        final String sparql = "SELECT * WHERE { ?person <http://isA> ?noun }";
-        final String pcjId = "123412342";
-        final CreatePCJ mockCreatePCJ = mock(CreatePCJ.class);
-        when(mockCreatePCJ.createPCJ( eq(instanceName), eq(sparql) ) ).thenReturn( pcjId );
-
-        final RyaClient mockCommands = mock(RyaClient.class);
-        when(mockCommands.getCreatePCJ()).thenReturn( mockCreatePCJ );
-
-        final SharedShellState state = new SharedShellState();
-        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
-        state.connectedToInstance(instanceName);
-
-        final SparqlPrompt mockSparqlPrompt = mock(SparqlPrompt.class);
-        when(mockSparqlPrompt.getSparql()).thenReturn(Optional.of(sparql));
-
-        // Execute the command.
-        final RyaAdminCommands commands = new RyaAdminCommands(state, mock(InstallPrompt.class), mockSparqlPrompt, mock(UninstallPrompt.class));
-        final String message = commands.createPcj();
-
-        // Verify the values that were provided to the command were passed through to CreatePCJ.
-        verify(mockCreatePCJ).createPCJ(eq(instanceName), eq(sparql));
-
-        // Verify a message is returned that explains what was created.
-        final String expected = "The PCJ has been created. Its ID is '123412342'.";
-        assertEquals(expected, message);
-    }
-
-    @Test
-    public void createPCJ_cancelledPrompt() throws InstanceDoesNotExistException, RyaClientException, IOException {
-        // Mock the object that performs the create operation.
-        final String instanceName = "unitTest";
-
-        final RyaClient mockCommands = mock(RyaClient.class);
-
-        final SharedShellState state = new SharedShellState();
-        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
-        state.connectedToInstance(instanceName);
-
-        final SparqlPrompt mockSparqlPrompt = mock(SparqlPrompt.class);
-        when(mockSparqlPrompt.getSparql()).thenReturn(Optional.absent());
-
-        // Execute the command.
-        final RyaAdminCommands commands = new RyaAdminCommands(state, mock(InstallPrompt.class), mockSparqlPrompt, mock(UninstallPrompt.class));
-        final String message = commands.createPcj();
-
-        // Verify a message is returned that explains what was created.
-        final String expected = "";
-        assertEquals(expected, message);
-    }
-
-    @Test
-    public void deletePCJ() throws InstanceDoesNotExistException, RyaClientException {
-        // Mock the object that performs the delete operation.
-        final DeletePCJ mockDeletePCJ = mock(DeletePCJ.class);
-
-        final RyaClient mockCommands = mock(RyaClient.class);
-        when(mockCommands.getDeletePCJ()).thenReturn( mockDeletePCJ );
-
-        final SharedShellState state = new SharedShellState();
-        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
-        final String instanceName = "unitTests";
-        state.connectedToInstance(instanceName);
-
-        // Execute the command.
-        final String pcjId = "123412342";
-
-        final RyaAdminCommands commands = new RyaAdminCommands(state, mock(InstallPrompt.class), mock(SparqlPrompt.class), mock(UninstallPrompt.class));
-        final String message = commands.deletePcj(pcjId);
-
-        // Verify the values that were provided to the command were passed through to the DeletePCJ.
-        verify(mockDeletePCJ).deletePCJ(eq(instanceName), eq(pcjId));
-
-        // Verify a message is returned that explains what was deleted.
-        final String expected = "The PCJ has been deleted.";
-        assertEquals(expected, message);
-    }
-
-    @Test
-    public void getInstanceDetails() throws InstanceDoesNotExistException, RyaClientException {
-        // This test is failed if the default timezone was not EST, so now it's fixed at EST.
-        // If you get assert mismatch of EST!=EDT, try the deprecated getTimeZone("EST") instead.
-        TimeZone.setDefault(TimeZone.getTimeZone("America/New_York"));
-        // Mock the object that performs the get operation.
-        final GetInstanceDetails mockGetInstanceDetails = mock(GetInstanceDetails.class);
-        final String instanceName = "test_instance";
-        final RyaDetails details = RyaDetails.builder().setRyaInstanceName(instanceName)
-                .setRyaVersion("1.2.3.4")
-                .addUser("alice")
-                .addUser("bob")
-                .addUser("charlie")
-                .setEntityCentricIndexDetails( new EntityCentricIndexDetails(true) )
-              //RYA-215.setGeoIndexDetails( new GeoIndexDetails(true) )
-                .setTemporalIndexDetails( new TemporalIndexDetails(true) )
-                .setFreeTextDetails( new FreeTextIndexDetails(true) )
-                .setPCJIndexDetails(
-                        PCJIndexDetails.builder()
-                            .setEnabled(true)
-                            .setFluoDetails( new FluoDetails("test_instance_rya_pcj_updater") )
-                            .addPCJDetails(
-                                    PCJDetails.builder()
-                                        .setId("pcj 1")
-                                        .setUpdateStrategy(PCJUpdateStrategy.BATCH)
-                                        .setLastUpdateTime( new Date(1252521351L) ))
-                            .addPCJDetails(
-                                    PCJDetails.builder()
-                                        .setId("pcj 2")
-                                        .setUpdateStrategy(PCJUpdateStrategy.INCREMENTAL)))
-                .setProspectorDetails( new ProspectorDetails(Optional.of(new Date(12525211L))) )
-                .setJoinSelectivityDetails( new JoinSelectivityDetails(Optional.of(new Date(125221351L))) )
-                .build();
-
-        when(mockGetInstanceDetails.getDetails(eq(instanceName))).thenReturn( Optional.of(details) );
-
-        final RyaClient mockCommands = mock(RyaClient.class);
-        when(mockCommands.getGetInstanceDetails()).thenReturn( mockGetInstanceDetails );
-
-        final SharedShellState state = new SharedShellState();
-        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
-        state.connectedToInstance(instanceName);
-
-        // Execute the command.
-        final RyaAdminCommands commands = new RyaAdminCommands(state, mock(InstallPrompt.class), mock(SparqlPrompt.class), mock(UninstallPrompt.class));
-        final String message = commands.printInstanceDetails();
-
-        // Verify the values that were provided to the command were passed through to the GetInstanceDetails.
-        verify(mockGetInstanceDetails).getDetails(eq(instanceName));
-
-        // Verify a message is returned that includes the details.
-        final String expected =
-                "General Metadata:\n" +
-                "  Instance Name: test_instance\n" +
-                "  RYA Version: 1.2.3.4\n" +
-                "  Users: alice, bob, charlie\n" +
-                "Secondary Indicies:\n" +
-                "  Entity Centric Index:\n" +
-                "    Enabled: true\n" +
-              //RYA-215"  Geospatial Index:\n" +
-            //RYA-215"    Enabled: true\n" +
-                "  Free Text Index:\n" +
-                "    Enabled: true\n" +
-                "  Temporal Index:\n" +
-                "    Enabled: true\n" +
-                "  PCJ Index:\n" +
-                "    Enabled: true\n" +
-                "    Fluo App Name: test_instance_rya_pcj_updater\n" +
-                "    PCJs:\n" +
-                "      ID: pcj 1\n" +
-                "        Update Strategy: BATCH\n" +
-                "        Last Update Time: Thu Jan 15 06:55:21 EST 1970\n" +
-                "      ID: pcj 2\n" +
-                "        Update Strategy: INCREMENTAL\n" +
-                "        Last Update Time: unavailable\n" +
-                "Statistics:\n" +
-                "  Prospector:\n" +
-                "    Last Update Time: Wed Dec 31 22:28:45 EST 1969\n" +
-                "  Join Selectivity:\n" +
-                "    Last Updated Time: Fri Jan 02 05:47:01 EST 1970\n";
-        assertEquals(expected, message);
-    }
-
-    @Test
-    public void install() throws DuplicateInstanceNameException, RyaClientException, IOException {
-        // Mock the object that performs the install operation.
-        final Install mockInstall = mock(Install.class);
-
-        final RyaClient mockCommands = mock(RyaClient.class);
-        when(mockCommands.getInstall()).thenReturn( mockInstall );
-
-        final SharedShellState state = new SharedShellState();
-        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
-
-        // Execute the command.
-        final String instanceName = "unitTests";
-        final InstallConfiguration installConfig = InstallConfiguration.builder()
-                .setEnableGeoIndex(true)
-                .setEnablePcjIndex(true)
-                .build();
-
-        final InstallPrompt mockInstallPrompt = mock(InstallPrompt.class);
-        when(mockInstallPrompt.promptInstanceName()).thenReturn( instanceName );
-        when(mockInstallPrompt.promptInstallConfiguration(instanceName)).thenReturn( installConfig );
-        when(mockInstallPrompt.promptVerified(eq(instanceName), eq(installConfig))).thenReturn(true);
-
-        final RyaAdminCommands commands = new RyaAdminCommands(state, mockInstallPrompt, mock(SparqlPrompt.class), mock(UninstallPrompt.class));
-        final String message = commands.install();
-
-        // Verify the values that were provided to the command were passed through to the Install.
-        verify(mockInstall).install(eq(instanceName), eq(installConfig));
-
-        // Verify a message is returned that indicates the success of the operation.
-        final String expected = "The Rya instance named 'unitTests' has been installed.";
-        assertEquals(expected, message);
-    }
-
-    @Test
-    public void installWithParameters() throws DuplicateInstanceNameException, RyaClientException, IOException {
-        // Mock the object that performs the install operation.
-        final Install mockInstall = mock(Install.class);
-
-        final RyaClient mockCommands = mock(RyaClient.class);
-        when(mockCommands.getInstall()).thenReturn( mockInstall );
-
-        final SharedShellState state = new SharedShellState();
-        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
-
-        final String instanceName = "unitTests";
-        final boolean enableTableHashPrefix = false;
-        final boolean enableEntityCentricIndex = true;
-        final boolean enableFreeTextIndex = false;
-        final boolean enableGeospatialIndex = true;
-        final boolean enableTemporalIndex = false;
-        final boolean enablePcjIndex = true;
-        final String fluoPcjAppName = instanceName + "pcj_updater";
-
-        // Execute the command.
-        final InstallConfiguration installConfig = InstallConfiguration.builder()
-                .setEnableTableHashPrefix(enableTableHashPrefix)
-                .setEnableEntityCentricIndex(enableEntityCentricIndex)
-                .setEnableFreeTextIndex(enableFreeTextIndex)
-                .setEnableGeoIndex(enableGeospatialIndex)
-                .setEnableTemporalIndex(enableTemporalIndex)
-                .setEnablePcjIndex(enablePcjIndex)
-                .setFluoPcjAppName(fluoPcjAppName)
-                .build();
-
-        final InstallPrompt mockInstallPrompt = mock(InstallPrompt.class);
-        when(mockInstallPrompt.promptInstanceName()).thenReturn( instanceName );
-        when(mockInstallPrompt.promptInstallConfiguration(instanceName)).thenReturn( installConfig );
-        when(mockInstallPrompt.promptVerified(eq(instanceName), eq(installConfig))).thenReturn(true);
-
-        final RyaAdminCommands commands = new RyaAdminCommands(state, mockInstallPrompt, mock(SparqlPrompt.class), mock(UninstallPrompt.class));
-        final String message = commands.installWithParameters(instanceName, enableTableHashPrefix, enableEntityCentricIndex, enableFreeTextIndex, enableGeospatialIndex, enableTemporalIndex, enablePcjIndex, fluoPcjAppName);
-
-        // Verify the values that were provided to the command were passed through to the Install.
-        verify(mockInstall).install(eq(instanceName), eq(installConfig));
-
-        // Verify a message is returned that indicates the success of the operation.
-        final String expected = "The Rya instance named 'unitTests' has been installed.";
-        assertEquals(expected, message);
-    }
-
-    @Test
-    public void installWithParameters_userAbort() throws DuplicateInstanceNameException, RyaClientException, IOException {
-        // Mock the object that performs the install operation.
-        final Install mockInstall = mock(Install.class);
-
-        final RyaClient mockCommands = mock(RyaClient.class);
-        when(mockCommands.getInstall()).thenReturn( mockInstall );
-
-        final SharedShellState state = new SharedShellState();
-        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
-
-        final String instanceName = "unitTests";
-        final boolean enableTableHashPrefix = false;
-        final boolean enableEntityCentricIndex = true;
-        final boolean enableFreeTextIndex = false;
-        final boolean enableGeospatialIndex = true;
-        final boolean enableTemporalIndex = false;
-        final boolean enablePcjIndex = true;
-        final String fluoPcjAppName = instanceName + "pcj_updater";
-
-        // Execute the command.
-        final InstallConfiguration installConfig = InstallConfiguration.builder()
-                .setEnableTableHashPrefix(enableTableHashPrefix)
-                .setEnableEntityCentricIndex(enableEntityCentricIndex)
-                .setEnableFreeTextIndex(enableFreeTextIndex)
-                .setEnableGeoIndex(enableGeospatialIndex)
-                .setEnableTemporalIndex(enableTemporalIndex)
-                .setEnablePcjIndex(enablePcjIndex)
-                .setFluoPcjAppName(fluoPcjAppName)
-                .build();
-
-        final InstallPrompt mockInstallPrompt = mock(InstallPrompt.class);
-        when(mockInstallPrompt.promptInstanceName()).thenReturn( instanceName );
-        when(mockInstallPrompt.promptInstallConfiguration(instanceName)).thenReturn( installConfig );
-        when(mockInstallPrompt.promptVerified(eq(instanceName), eq(installConfig))).thenReturn(false);
-
-        final RyaAdminCommands commands = new RyaAdminCommands(state, mockInstallPrompt, mock(SparqlPrompt.class), mock(UninstallPrompt.class));
-        final String message = commands.installWithParameters(instanceName, enableTableHashPrefix, enableEntityCentricIndex, enableFreeTextIndex, enableGeospatialIndex, enableTemporalIndex, enablePcjIndex, fluoPcjAppName);
-
-        // Verify a message is returned that indicates the success of the operation.
-        final String expected = "Skipping Installation.";
-        assertEquals(expected, message);
-    }
-
-    @Test
-    public void listInstances() throws RyaClientException, IOException {
-        // Mock the object that performs the list operation.
-        final ListInstances mockListInstances = mock(ListInstances.class);
-        final List<String> instanceNames = Lists.newArrayList("a", "b", "c", "d");
-        when(mockListInstances.listInstances()).thenReturn(instanceNames);
-
-        final RyaClient mockCommands = mock(RyaClient.class);
-        when(mockCommands.getListInstances()).thenReturn( mockListInstances );
-
-        final SharedShellState state = new SharedShellState();
-        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
-        state.connectedToInstance("b");
-
-        // Execute the command.
-        final RyaAdminCommands commands = new RyaAdminCommands(state, mock(InstallPrompt.class), mock(SparqlPrompt.class), mock(UninstallPrompt.class));
-        final String message = commands.listInstances();
-
-        // Verify a message is returned that lists the the instances.
-        final String expected =
-                "Rya instance names:\n" +
-                "   a\n" +
-                " * b\n" +
-                "   c\n" +
-                "   d\n";
-        assertEquals(expected, message);
-    }
-
-    @Test
-    public void addUser() throws Exception {
-        // Mock the object that performs the Add User command.
-        final AddUser mockAddUser = mock(AddUser.class);
-
-        final RyaClient mockClient = mock(RyaClient.class);
-        when(mockClient.getAddUser()).thenReturn( mockAddUser );
-
-        final SharedShellState state = new SharedShellState();
-        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockClient);
-        state.connectedToInstance("test_instance");
-
-        // Execute the command.
-        final RyaAdminCommands commands = new RyaAdminCommands(state, mock(InstallPrompt.class), mock(SparqlPrompt.class), mock(UninstallPrompt.class));
-        commands.addUser("alice");
-
-        // Verify the add request was forwarded to the client.
-        verify(mockAddUser).addUser(eq("test_instance"), eq("alice"));
-    }
-
-    @Test
-    public void removeUser() throws Exception {
-        // Mock the object that performs the Add User command.
-        final RemoveUser mockRemoveUser = mock(RemoveUser.class);
-
-        final RyaClient mockClient = mock(RyaClient.class);
-        when(mockClient.getRemoveUser()).thenReturn( mockRemoveUser );
-
-        final SharedShellState state = new SharedShellState();
-        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockClient);
-        state.connectedToInstance("test_instance");
-
-        // Execute the command.
-        final RyaAdminCommands commands = new RyaAdminCommands(state, mock(InstallPrompt.class), mock(SparqlPrompt.class), mock(UninstallPrompt.class));
-        commands.removeUser("alice");
-
-        // Verify the add request was forwarded to the client.
-        verify(mockRemoveUser).removeUser(eq("test_instance"), eq("alice"));
-    }
-
-    @Test
-    public void uninstall_yes() throws Exception {
-        // Mock the object that performs the Uninstall command.
-        final Uninstall mockUninstall = mock(Uninstall.class);
-
-        // Mock a prompt that says the user does want to uninstall it.
-        final UninstallPrompt uninstallPrompt = mock(UninstallPrompt.class);
-        when(uninstallPrompt.promptAreYouSure( eq("test_instance") )).thenReturn(true);
-
-        final RyaClient mockClient = mock(RyaClient.class);
-        when(mockClient.getUninstall()).thenReturn( mockUninstall );
-
-        final SharedShellState state = new SharedShellState();
-        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockClient);
-        state.connectedToInstance("test_instance");
-
-        // Execute the command.
-        final RyaAdminCommands commands = new RyaAdminCommands(state, mock(InstallPrompt.class), mock(SparqlPrompt.class), uninstallPrompt);
-        commands.uninstall();
-
-        // Verify the request was forwarded to the client.
-        verify(mockUninstall).uninstall(eq("test_instance"));
-    }
-
-    @Test
-    public void uninstall_no() throws Exception {
-        // Mock the object that performs the Uninstall command.
-        final Uninstall mockUninstall = mock(Uninstall.class);
-
-        // Mock a prompt that says the user does want to uninstall it.
-        final UninstallPrompt uninstallPrompt = mock(UninstallPrompt.class);
-        when(uninstallPrompt.promptAreYouSure( eq("test_instance") )).thenReturn(false);
-
-        final RyaClient mockClient = mock(RyaClient.class);
-        when(mockClient.getUninstall()).thenReturn( mockUninstall );
-
-        final SharedShellState state = new SharedShellState();
-        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockClient);
-        state.connectedToInstance("test_instance");
-
-        // Execute the command.
-        final RyaAdminCommands commands = new RyaAdminCommands(state, mock(InstallPrompt.class), mock(SparqlPrompt.class), uninstallPrompt);
-        commands.uninstall();
-
-        // Verify the request was forwarded to the client.
-        verify(mockUninstall, never()).uninstall(eq("test_instance"));
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/2564ac0a/extras/rya.console/src/test/java/org/apache/rya/shell/RyaCommandsTest.java
----------------------------------------------------------------------
diff --git a/extras/rya.console/src/test/java/org/apache/rya/shell/RyaCommandsTest.java b/extras/rya.console/src/test/java/org/apache/rya/shell/RyaCommandsTest.java
deleted file mode 100644
index a0a3979..0000000
--- a/extras/rya.console/src/test/java/org/apache/rya/shell/RyaCommandsTest.java
+++ /dev/null
@@ -1,278 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.rya.shell;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import java.io.File;
-import java.io.IOException;
-import java.nio.charset.StandardCharsets;
-import java.nio.file.Paths;
-
-import org.apache.commons.io.FileUtils;
-import org.apache.rya.api.client.ExecuteSparqlQuery;
-import org.apache.rya.api.client.InstanceDoesNotExistException;
-import org.apache.rya.api.client.LoadStatementsFile;
-import org.apache.rya.api.client.RyaClient;
-import org.apache.rya.api.client.RyaClientException;
-import org.apache.rya.api.client.accumulo.AccumuloConnectionDetails;
-import org.apache.rya.shell.util.ConsolePrinter;
-import org.apache.rya.shell.util.SparqlPrompt;
-import org.junit.Test;
-import org.openrdf.rio.RDFFormat;
-
-import com.google.common.base.Optional;
-
-/**
- * Unit tests the methods of {@link RyaAdminCommands}.
- */
-public class RyaCommandsTest {
-
-    @Test
-    public void testLoadData() throws InstanceDoesNotExistException, RyaClientException, IOException {
-        // Mock the object that performs the create operation.
-        final String instanceName = "unitTest";
-        final String statementsFile = "/path/to/statements.nt";
-        final String format = null;
-
-        final LoadStatementsFile mockLoadStatementsFile = mock(LoadStatementsFile.class);
-        final RyaClient mockCommands = mock(RyaClient.class);
-        when(mockCommands.getLoadStatementsFile()).thenReturn(mockLoadStatementsFile);
-
-        final SharedShellState state = new SharedShellState();
-        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
-        state.connectedToInstance(instanceName);
-
-        final SparqlPrompt mockSparqlPrompt = mock(SparqlPrompt.class);
-
-        final ConsolePrinter mockConsolePrinter = mock(ConsolePrinter.class);
-
-        // Execute the command.
-        final RyaCommands commands = new RyaCommands(state, mockSparqlPrompt, mockConsolePrinter);
-        final String message = commands.loadData(statementsFile, format);
-
-        // Verify the values that were provided to the command were passed through to LoadStatementsFile.
-        verify(mockLoadStatementsFile).loadStatements(instanceName, Paths.get(statementsFile), RDFFormat.NTRIPLES);
-
-        // Verify a message is returned that explains what was created.
-        assertTrue(message.startsWith("Loaded the file: '" + statementsFile +"' successfully in "));
-        assertTrue(message.endsWith(" seconds."));
-    }
-
-    @Test
-    public void testLoadData_specifyFormat() throws InstanceDoesNotExistException, RyaClientException, IOException {
-        // Mock the object that performs the create operation.
-        final String instanceName = "unitTest";
-        final String statementsFile = "/path/to/statements.nt";
-        final String format = "N-TRIPLES";
-
-        final LoadStatementsFile mockLoadStatementsFile = mock(LoadStatementsFile.class);
-        final RyaClient mockCommands = mock(RyaClient.class);
-        when(mockCommands.getLoadStatementsFile()).thenReturn(mockLoadStatementsFile);
-
-        final SharedShellState state = new SharedShellState();
-        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
-        state.connectedToInstance(instanceName);
-
-        final SparqlPrompt mockSparqlPrompt = mock(SparqlPrompt.class);
-
-        final ConsolePrinter mockConsolePrinter = mock(ConsolePrinter.class);
-
-        // Execute the command.
-        final RyaCommands commands = new RyaCommands(state, mockSparqlPrompt, mockConsolePrinter);
-        final String message = commands.loadData(statementsFile, format);
-
-        // Verify the values that were provided to the command were passed through to LoadStatementsFile.
-        verify(mockLoadStatementsFile).loadStatements(instanceName, Paths.get(statementsFile), RDFFormat.NTRIPLES);
-
-        // Verify a message is returned that explains what was created.
-        assertTrue(message.startsWith("Loaded the file: '" + statementsFile +"' successfully in "));
-        assertTrue(message.endsWith(" seconds."));
-    }
-
-    @Test(expected = RuntimeException.class)
-    public void testLoadData_specifyInvalidFormat() throws InstanceDoesNotExistException, RyaClientException, IOException {
-        // Mock the object that performs the create operation.
-        final String instanceName = "unitTest";
-        final String statementsFile = "/path/to/statements.nt";
-        final String format = "INVALID_FORMAT_NAME";
-
-        final LoadStatementsFile mockLoadStatementsFile = mock(LoadStatementsFile.class);
-        final RyaClient mockCommands = mock(RyaClient.class);
-        when(mockCommands.getLoadStatementsFile()).thenReturn(mockLoadStatementsFile);
-
-        final SharedShellState state = new SharedShellState();
-        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
-        state.connectedToInstance(instanceName);
-
-        final SparqlPrompt mockSparqlPrompt = mock(SparqlPrompt.class);
-
-        final ConsolePrinter mockConsolePrinter = mock(ConsolePrinter.class);
-
-        // Execute the command.
-        final RyaCommands commands = new RyaCommands(state, mockSparqlPrompt, mockConsolePrinter);
-
-        commands.loadData(statementsFile, format);
-    }
-
-    @Test(expected = RuntimeException.class)
-    public void testLoadData_specifyInvalidFilenameFormat() throws InstanceDoesNotExistException, RyaClientException, IOException {
-        // Mock the object that performs the create operation.
-        final String instanceName = "unitTest";
-        final String statementsFile = "/path/to/statements.invalidFormat";
-        final String format = null;
-
-        final LoadStatementsFile mockLoadStatementsFile = mock(LoadStatementsFile.class);
-        final RyaClient mockCommands = mock(RyaClient.class);
-        when(mockCommands.getLoadStatementsFile()).thenReturn(mockLoadStatementsFile);
-
-        final SharedShellState state = new SharedShellState();
-        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
-        state.connectedToInstance(instanceName);
-
-        final SparqlPrompt mockSparqlPrompt = mock(SparqlPrompt.class);
-
-        final ConsolePrinter mockConsolePrinter = mock(ConsolePrinter.class);
-
-        // Execute the command.
-        final RyaCommands commands = new RyaCommands(state, mockSparqlPrompt, mockConsolePrinter);
-
-        commands.loadData(statementsFile, format);
-    }
-
-    @Test
-    public void testSparqlQuery() throws InstanceDoesNotExistException, RyaClientException, IOException {
-        // Mock the object that performs the create operation.
-        final String instanceName = "unitTest";
-        final String queryFile = "src/test/resources/Query1.sparql";
-        final String queryContent = FileUtils.readFileToString(new File(queryFile), StandardCharsets.UTF_8);
-        final String expectedMessage = "MockAnswer";
-
-        final ExecuteSparqlQuery mockExecuteSparqlQuery = mock(ExecuteSparqlQuery.class);
-        when(mockExecuteSparqlQuery.executeSparqlQuery(instanceName, queryContent)).thenReturn(expectedMessage);
-
-        final RyaClient mockCommands = mock(RyaClient.class);
-        when(mockCommands.getExecuteSparqlQuery()).thenReturn(mockExecuteSparqlQuery);
-
-
-        final SharedShellState state = new SharedShellState();
-        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
-        state.connectedToInstance(instanceName);
-
-        final SparqlPrompt mockSparqlPrompt = mock(SparqlPrompt.class);
-
-        final ConsolePrinter mockConsolePrinter = mock(ConsolePrinter.class);
-
-        // Execute the command.
-        final RyaCommands commands = new RyaCommands(state, mockSparqlPrompt, mockConsolePrinter);
-        final String message = commands.sparqlQuery(queryFile);
-
-        // Verify the values that were provided to the command were passed through to LoadStatementsFile.
-        verify(mockExecuteSparqlQuery).executeSparqlQuery(instanceName, queryContent);
-
-        assertEquals(expectedMessage, message);
-        // Verify a message is returned that explains what was created.
-    }
-
-    @Test(expected = RuntimeException.class)
-    public void testSparqlQuery_nonexistentFile() throws InstanceDoesNotExistException, RyaClientException, IOException {
-        // Mock the object that performs the create operation.
-        final String instanceName = "unitTest";
-        final String queryFile = "src/test/resources/Nonexistent.sparql";
-
-        final RyaClient mockCommands = mock(RyaClient.class);
-
-        final SharedShellState state = new SharedShellState();
-        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
-        state.connectedToInstance(instanceName);
-
-        final SparqlPrompt mockSparqlPrompt = mock(SparqlPrompt.class);
-
-        final ConsolePrinter mockConsolePrinter = mock(ConsolePrinter.class);
-
-        // Execute the command.
-        final RyaCommands commands = new RyaCommands(state, mockSparqlPrompt, mockConsolePrinter);
-        commands.sparqlQuery(queryFile);
-    }
-
-    @Test
-    public void testSparqlQuery_fromPrompt() throws InstanceDoesNotExistException, RyaClientException, IOException {
-        // Mock the object that performs the create operation.
-        final String instanceName = "unitTest";
-        final String queryContent = "SELECT * WHERE { ?person <http://isA> ?noun }";
-        final String queryFile = null;
-        final String expectedMessage = "MockAnswer";
-
-        final ExecuteSparqlQuery mockExecuteSparqlQuery = mock(ExecuteSparqlQuery.class);
-        when(mockExecuteSparqlQuery.executeSparqlQuery(instanceName, queryContent)).thenReturn(expectedMessage);
-
-        final RyaClient mockCommands = mock(RyaClient.class);
-        when(mockCommands.getExecuteSparqlQuery()).thenReturn(mockExecuteSparqlQuery);
-
-
-        final SharedShellState state = new SharedShellState();
-        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
-        state.connectedToInstance(instanceName);
-
-        final SparqlPrompt mockSparqlPrompt = mock(SparqlPrompt.class);
-        when(mockSparqlPrompt.getSparql()).thenReturn(Optional.of(queryContent));
-
-        final ConsolePrinter mockConsolePrinter = mock(ConsolePrinter.class);
-
-        // Execute the command.
-        final RyaCommands commands = new RyaCommands(state, mockSparqlPrompt, mockConsolePrinter);
-        final String message = commands.sparqlQuery(queryFile);
-
-        // Verify the values that were provided to the command were passed through to LoadStatementsFile.
-        verify(mockExecuteSparqlQuery).executeSparqlQuery(instanceName, queryContent);
-
-        assertEquals(expectedMessage, message);
-        // Verify a message is returned that explains what was created.
-    }
-
-    @Test
-    public void testSparqlQuery_fromPrompt_cancelled() throws InstanceDoesNotExistException, RyaClientException, IOException {
-        // Mock the object that performs the create operation.
-        final String instanceName = "unitTest";
-        final String queryFile = null;
-        final String expectedMessage = "";
-
-        final RyaClient mockCommands = mock(RyaClient.class);
-
-        final SharedShellState state = new SharedShellState();
-        state.connectedToAccumulo(mock(AccumuloConnectionDetails.class), mockCommands);
-        state.connectedToInstance(instanceName);
-
-        final SparqlPrompt mockSparqlPrompt = mock(SparqlPrompt.class);
-        when(mockSparqlPrompt.getSparql()).thenReturn(Optional.absent());
-
-        final ConsolePrinter mockConsolePrinter = mock(ConsolePrinter.class);
-
-        // Execute the command.
-        final RyaCommands commands = new RyaCommands(state, mockSparqlPrompt, mockConsolePrinter);
-        final String message = commands.sparqlQuery(queryFile);
-
-        assertEquals(expectedMessage, message);
-        // Verify a message is returned that explains what was created.
-    }
-
-}