### Question:
JsonReader implements Closeable { @CheckReturnValue public abstract int selectName(Options options) throws IOException; JsonReader();   JsonReader(JsonReader copyFrom); @CheckReturnValue static JsonReader of(BufferedSource source); final void setLenient(boolean lenient); @CheckReturnValue final boolean isLenient(); final void setFailOnUnknown(boolean failOnUnknown); @CheckReturnValue final boolean failOnUnknown(); abstract void beginArray(); abstract void endArray(); abstract void beginObject(); abstract void endObject(); @CheckReturnValue abstract boolean hasNext(); @CheckReturnValue abstract Token peek(); @CheckReturnValue abstract String nextName(); @CheckReturnValue abstract int selectName(Options options); abstract void skipName(); abstract String nextString(); @CheckReturnValue abstract int selectString(Options options); abstract boolean nextBoolean(); abstract @Nullable T nextNull(); abstract double nextDouble(); abstract long nextLong(); abstract int nextInt(); abstract BufferedSource nextSource(); abstract void skipValue(); final @Nullable Object readJsonValue(); @CheckReturnValue abstract JsonReader peekJson(); @CheckReturnValue final String getPath(); @SuppressWarnings("unchecked") @CheckReturnValue final @Nullable T tag(Class<T> clazz); final void setTag(Class<T> clazz, T value); abstract void promoteNameToValue();  }### Answer:
@Test public void selectName() throws IOException { JsonReader.Options abc = JsonReader.Options.of("a", "b", "c"); JsonReader reader = newReader("{\"a\": 5, \"b\": 5, \"c\": 5, \"d\": 5}"); reader.beginObject(); assertEquals("$.", reader.getPath()); assertEquals(0, reader.selectName(abc)); assertEquals("$.a", reader.getPath()); assertEquals(5, reader.nextInt()); assertEquals("$.a", reader.getPath()); assertEquals(1, reader.selectName(abc)); assertEquals("$.b", reader.getPath()); assertEquals(5, reader.nextInt()); assertEquals("$.b", reader.getPath()); assertEquals(2, reader.selectName(abc)); assertEquals("$.c", reader.getPath()); assertEquals(5, reader.nextInt()); assertEquals("$.c", reader.getPath()); assertEquals(-1, reader.selectName(abc)); assertEquals("$.c", reader.getPath()); assertEquals(JsonReader.Token.NAME, reader.peek()); assertEquals("d", reader.nextName()); assertEquals("$.d", reader.getPath()); assertEquals(5, reader.nextInt()); assertEquals("$.d", reader.getPath()); reader.endObject(); }