EnumAdapter implements IPreferenceAdapter<T> { @Override public void put(@Nonnull String key, @Nonnull T value, IGateway gateway) { gateway.putString(key, toString(value)); } EnumAdapter(@Nonnull Class<T> clazz); @Nonnull @Override Observable<T> observe(@Nonnull String key, @Nonnull T defaultValue, @Nonnull IGateway gateway); @Override void put(@Nonnull String key, @Nonnull T value, IGateway gateway); @Override Completable putSync(@Nonnull String key, @Nonnull T value, IGateway gateway);  }
@Test public void testPut() throws Exception { adapter.put("testKey", NUMBER.TWO, gateway); verify(gateway).putString("testKey", NUMBER.TWO.name()); }