• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

box / box-java-sdk / #5076

07 Oct 2025 12:35PM UTC coverage: 37.132% (+0.007%) from 37.125%
#5076

push

github

web-flow
test: Change `Event.additionalDetails` field assertion in events test (box/box-codegen#858) (#1491)

18454 of 49699 relevant lines covered (37.13%)

0.37 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

85.19
/src/main/java/com/box/sdkgen/networking/fetchresponse/FetchResponse.java
1
package com.box.sdkgen.networking.fetchresponse;
2

3
import com.fasterxml.jackson.databind.JsonNode;
4
import java.io.InputStream;
5
import java.util.Map;
6

7
/** Response of the fetch call */
8
public class FetchResponse {
9

10
  /** URL of the response */
11
  public String url;
12

13
  /** HTTP status code of the response */
14
  public final int status;
15

16
  /** Response body of the response */
17
  public JsonNode data;
18

19
  /** Streamed content of the response */
20
  public InputStream content;
21

22
  /** HTTP headers of the response */
23
  public final Map<String, String> headers;
24

25
  public FetchResponse(int status, Map<String, String> headers) {
×
26
    this.status = status;
×
27
    this.headers = headers;
×
28
  }
×
29

30
  protected FetchResponse(Builder builder) {
1✔
31
    this.url = builder.url;
1✔
32
    this.status = builder.status;
1✔
33
    this.data = builder.data;
1✔
34
    this.content = builder.content;
1✔
35
    this.headers = builder.headers;
1✔
36
  }
1✔
37

38
  public String getUrl() {
39
    return url;
1✔
40
  }
41

42
  public int getStatus() {
43
    return status;
1✔
44
  }
45

46
  public JsonNode getData() {
47
    return data;
1✔
48
  }
49

50
  public InputStream getContent() {
51
    return content;
1✔
52
  }
53

54
  public Map<String, String> getHeaders() {
55
    return headers;
1✔
56
  }
57

58
  public static class Builder {
59

60
    protected String url;
61

62
    protected final int status;
63

64
    protected JsonNode data;
65

66
    protected InputStream content;
67

68
    protected final Map<String, String> headers;
69

70
    public Builder(int status, Map<String, String> headers) {
1✔
71
      this.status = status;
1✔
72
      this.headers = headers;
1✔
73
    }
1✔
74

75
    public Builder url(String url) {
76
      this.url = url;
1✔
77
      return this;
1✔
78
    }
79

80
    public Builder data(JsonNode data) {
81
      this.data = data;
1✔
82
      return this;
1✔
83
    }
84

85
    public Builder content(InputStream content) {
86
      this.content = content;
1✔
87
      return this;
1✔
88
    }
89

90
    public FetchResponse build() {
91
      return new FetchResponse(this);
1✔
92
    }
93
  }
94
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc