### Question:
JsonValueReader extends JsonReader { @Override public void promoteNameToValue() throws IOException { if (hasNext()) { String name = nextName(); push(name); } } JsonValueReader(Object root);   JsonValueReader(JsonValueReader copyFrom); @Override void beginArray(); @Override void endArray(); @Override void beginObject(); @Override void endObject(); @Override boolean hasNext(); @Override Token peek(); @Override String nextName(); @Override int selectName(Options options); @Override void skipName(); @Override String nextString(); @Override int selectString(Options options); @Override boolean nextBoolean(); @Override @Nullable T nextNull(); @Override double nextDouble(); @Override long nextLong(); @Override int nextInt(); @Override void skipValue(); @Override BufferedSource nextSource(); @Override JsonReader peekJson(); @Override void promoteNameToValue(); @Override void close();  }### Answer:
@Test public void promoteNameToValue() throws Exception { Map<String, String> root = singletonMap("a", "b"); JsonReader reader = new JsonValueReader(root); reader.beginObject(); reader.promoteNameToValue(); assertThat(reader.peek()).isEqualTo(JsonReader.Token.STRING); assertThat(reader.nextString()).isEqualTo("a"); assertThat(reader.peek()).isEqualTo(JsonReader.Token.STRING); assertThat(reader.nextString()).isEqualTo("b"); reader.endObject(); assertThat(reader.peek()).isEqualTo(JsonReader.Token.END_DOCUMENT); }