### Question:
JsonAdapter { @CheckReturnValue public JsonAdapter<T> indent(final String indent) { if (indent == null) { throw new NullPointerException("indent == null"); } final JsonAdapter<T> delegate = this; return new JsonAdapter<T>() { @Override public @Nullable T fromJson(JsonReader reader) throws IOException { return delegate.fromJson(reader); } @Override public void toJson(JsonWriter writer, @Nullable T value) throws IOException { String originalIndent = writer.getIndent(); writer.setIndent(indent); try { delegate.toJson(writer, value); } finally { writer.setIndent(originalIndent); } } @Override boolean isLenient() { return delegate.isLenient(); } @Override public String toString() { return delegate + ".indent(\"" + indent + "\")"; } }; }  @CheckReturnValue abstract @Nullable T fromJson(JsonReader reader); @CheckReturnValue final @Nullable T fromJson(BufferedSource source); @CheckReturnValue final @Nullable T fromJson(String string); abstract void toJson(JsonWriter writer, @Nullable T value); final void toJson(BufferedSink sink, @Nullable T value); @CheckReturnValue final String toJson(@Nullable T value); @CheckReturnValue final @Nullable Object toJsonValue(@Nullable T value); @CheckReturnValue final @Nullable T fromJsonValue(@Nullable Object value); @CheckReturnValue final JsonAdapter<T> serializeNulls(); @CheckReturnValue final JsonAdapter<T> nullSafe(); @CheckReturnValue final JsonAdapter<T> nonNull(); @CheckReturnValue final JsonAdapter<T> lenient(); @CheckReturnValue final JsonAdapter<T> failOnUnknown(); @CheckReturnValue JsonAdapter<T> indent(final String indent);  }### Answer:
@Test public void indent() throws Exception { assumeTrue(factory.encodesToBytes()); JsonAdapter<List<String>> indent = new JsonAdapter<List<String>>() { @Override public List<String> fromJson(JsonReader reader) throws IOException { throw new AssertionError(); } @Override public void toJson(JsonWriter writer, List<String> value) throws IOException { writer.beginArray(); for (String s : value) { writer.value(s); } writer.endArray(); } }.indent("\t\t\t"); JsonWriter writer = factory.newWriter(); indent.toJson(writer, Arrays.asList("a", "b", "c")); assertThat(factory.json()) .isEqualTo("" + "[\n" + "\t\t\t\"a\",\n" + "\t\t\t\"b\",\n" + "\t\t\t\"c\"\n" + "]"); }
@Test public void indentDisallowsNull() throws Exception { JsonAdapter<Object> adapter = new JsonAdapter<Object>() { @Override public Object fromJson(JsonReader reader) { throw new AssertionError(); } @Override public void toJson(JsonWriter writer, Object value) { throw new AssertionError(); } }; try { adapter.indent(null); fail(); } catch (NullPointerException expected) { assertThat(expected).hasMessageThat().isEqualTo("indent == null"); } }