// Path: src/main/java/wdawson/samples/dropwizard/util/resources/ResourceUtils.java
// public class ResourceUtils {
// 
//     /**
//      * Reads the lines from a resource given it's location on the classpath
//      *
//      * @param resourceName The location of the resource on the classpath
//      * @return The lines in the resource as a List of Strings
//      * @throws IllegalArgumentException If the resource could not be found or parsed
//      */
//     public static List<String> readLinesFromResource(String resourceName) {
//         URL namesResourceURL = Resources.getResource(resourceName);
//         try {
//             return Resources.readLines(namesResourceURL, Charsets.UTF_8);
//         } catch (IOException e) {
//             throw new IllegalArgumentException("Some I/O error occurred when reading " + resourceName);
//         }
//     }
// 
// }


import com.codahale.metrics.health.HealthCheck;
import com.google.common.annotations.VisibleForTesting;
import org.apache.commons.lang3.StringUtils;
import wdawson.samples.dropwizard.util.resources.ResourceUtils;
import java.util.List;
package wdawson.samples.dropwizard.health;



/**
 * Health check for user info
 *
 * Checks that we have access to user data store
 *
 * @author wdawson
 */
public class UserInfoHealthCheck extends HealthCheck {

    private final String namesResource;
    private final List<String> names;

    public UserInfoHealthCheck(String namesResource) {
        this.namesResource = namesResource;
// Path: src/main/java/wdawson/samples/dropwizard/util/resources/ResourceUtils.java
// public class ResourceUtils {
// 
//     /**
//      * Reads the lines from a resource given it's location on the classpath
//      *
//      * @param resourceName The location of the resource on the classpath
//      * @return The lines in the resource as a List of Strings
//      * @throws IllegalArgumentException If the resource could not be found or parsed
//      */
//     public static List<String> readLinesFromResource(String resourceName) {
//         URL namesResourceURL = Resources.getResource(resourceName);
//         try {
//             return Resources.readLines(namesResourceURL, Charsets.UTF_8);
//         } catch (IOException e) {
//             throw new IllegalArgumentException("Some I/O error occurred when reading " + resourceName);
//         }
//     }
// 
// }


// Path: src/main/java/wdawson/samples/dropwizard/health/UserInfoHealthCheck.java
import com.codahale.metrics.health.HealthCheck;
import com.google.common.annotations.VisibleForTesting;
import org.apache.commons.lang3.StringUtils;
import wdawson.samples.dropwizard.util.resources.ResourceUtils;
import java.util.List;

package wdawson.samples.dropwizard.health;



/**
 * Health check for user info
 *
 * Checks that we have access to user data store
 *
 * @author wdawson
 */
public class UserInfoHealthCheck extends HealthCheck {

    private final String namesResource;
    private final List<String> names;

    public UserInfoHealthCheck(String namesResource) {
        this.namesResource = namesResource;
        names = ResourceUtils.readLinesFromResource(this.namesResource);