Mocking support
メンテナーはふだん 1 日以内に返信
@hemasekhar-p がすでに取り組んでいます。
2026年2月6日 から。
評価
この issue はまだ評価されていません。
説明
Due to the design of the GenAI Client() class it isn't possible to mock it for most use cases.
For example (with Mockito):
Client clientMock = mock(Client.class);
when(clientMock.models).thenReturn(mock(Models.class));
A simple scenario such as this won't work because the models property in Client is final and can only be set through constructors that I also can't override because the class is marked as final. It might be possible to use mockito-inline but this isn't ideal for a number of reasons.
The idiomatic way for the Client class to be defined in Java is for models to be accessed via a getter which would also support basic mocking but other ways to support mocking a Client would be welcome.
- 主要言語
- Java
- スター
- 398
- フォーク
- 126
- 平均マージ
- 1日 12時間
- マージ済み PR(30日)
- 71
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
googleapis/java-genai のほかの issue
-
priority: p2 type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
googleapis/java-genai#1372 ·
メンテナーはふだん 1 日以内に返信
-
Interactions API: GaosClientException.getMessage() only returns "400 . API error occurred" and omits the server error details対応中かも @hemasekhar-p が 24 日前に担当しました。 オープンpriority: p2 type: bug
googleapis/java-genai#1282 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Interactions API: store(false) omits "id", breaking Interaction and InteractionCompletedEvent deserialization対応中かも @hemasekhar-p が 24 日前に担当しました。 オープンpriority: p2 type: bug
googleapis/java-genai#1281 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Interaction.outputText() always returns Optional.empty() (SDK-computed field is never populated)対応中かも @hemasekhar-p が 24 日前に担当しました。 オープンpriority: p2 type: bug
googleapis/java-genai#1280 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Gen AI with structured output - `propertyOrdering` in Python vs. Java implementations対応中かも @hemasekhar-p が 78 日前に担当しました。 オープンpriority: p3 type: feature request
googleapis/java-genai#1169 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
googleapis/java-genai の issue をすべて見る
似ている issue
-
Component: Frontend Component: Web Component Type: Maintenance
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
it-at-m/refarch-templates#1944 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 60/100
-
GeoSeries scale and skew tests fail with pytest 9.2.0対応中かも @jiayuasu が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
priority: medium Review effort [1-5]: 3 status: needs-triage type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
carlos-emr/carlos#5431 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
wcandillon/react-native-skia#4360 ·
メンテナーはふだん 1 日以内に返信