Remove reliance on a method not in Guava, and use a custom class for a test case instead of a Java7 type.