BooleanJsonAdapter { @ToJson int write(@IntBoolean boolean value) { return value ? 1 : 0; }    }
@Test public void write() { BooleanJsonAdapter adapter = new BooleanJsonAdapter(); assertEquals(1, adapter.write(true)); assertEquals(0, adapter.write(false)); }