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

box / box-java-sdk-gen / #155

30 May 2025 01:03PM UTC coverage: 35.646% (+0.3%) from 35.311%
#155

push

github

web-flow
fix: Fix downscope token to use `retrieveToken` method for token retrieval (box/box-codegen#731) (#320)

4 of 4 new or added lines in 4 files covered. (100.0%)

2952 existing lines in 99 files now uncovered.

15628 of 43842 relevant lines covered (35.65%)

0.36 hits per line

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

5.26
/src/main/java/com/box/sdkgen/schemas/group/Group.java
1
package com.box.sdkgen.schemas.group;
2

3
import com.box.sdkgen.internal.utils.DateTimeUtils;
4
import com.box.sdkgen.schemas.groupbase.GroupBaseTypeField;
5
import com.box.sdkgen.schemas.groupmini.GroupMini;
6
import com.box.sdkgen.schemas.groupmini.GroupMiniGroupTypeField;
7
import com.box.sdkgen.serialization.json.EnumWrapper;
8
import com.fasterxml.jackson.annotation.JsonProperty;
9
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
10
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
11
import java.util.Date;
12
import java.util.Objects;
13

14
public class Group extends GroupMini {
15

16
  @JsonProperty("created_at")
17
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
18
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
19
  protected Date createdAt;
20

21
  @JsonProperty("modified_at")
22
  @JsonSerialize(using = DateTimeUtils.DateTimeSerializer.class)
23
  @JsonDeserialize(using = DateTimeUtils.DateTimeDeserializer.class)
24
  protected Date modifiedAt;
25

26
  public Group(@JsonProperty("id") String id) {
27
    super(id);
1✔
28
  }
1✔
29

30
  protected Group(GroupBuilder builder) {
UNCOV
31
    super(builder);
×
UNCOV
32
    this.createdAt = builder.createdAt;
×
33
    this.modifiedAt = builder.modifiedAt;
×
UNCOV
34
  }
×
35

36
  public Date getCreatedAt() {
UNCOV
37
    return createdAt;
×
38
  }
39

40
  public Date getModifiedAt() {
41
    return modifiedAt;
×
42
  }
43

44
  @Override
45
  public boolean equals(Object o) {
46
    if (this == o) {
×
47
      return true;
×
48
    }
49
    if (o == null || getClass() != o.getClass()) {
×
50
      return false;
×
51
    }
UNCOV
52
    Group casted = (Group) o;
×
UNCOV
53
    return Objects.equals(id, casted.id)
×
UNCOV
54
        && Objects.equals(type, casted.type)
×
55
        && Objects.equals(name, casted.name)
×
UNCOV
56
        && Objects.equals(groupType, casted.groupType)
×
UNCOV
57
        && Objects.equals(createdAt, casted.createdAt)
×
UNCOV
58
        && Objects.equals(modifiedAt, casted.modifiedAt);
×
59
  }
60

61
  @Override
62
  public int hashCode() {
UNCOV
63
    return Objects.hash(id, type, name, groupType, createdAt, modifiedAt);
×
64
  }
65

66
  @Override
67
  public String toString() {
UNCOV
68
    return "Group{"
×
69
        + "id='"
70
        + id
71
        + '\''
72
        + ", "
73
        + "type='"
74
        + type
75
        + '\''
76
        + ", "
77
        + "name='"
78
        + name
79
        + '\''
80
        + ", "
81
        + "groupType='"
82
        + groupType
83
        + '\''
84
        + ", "
85
        + "createdAt='"
86
        + createdAt
87
        + '\''
88
        + ", "
89
        + "modifiedAt='"
90
        + modifiedAt
91
        + '\''
92
        + "}";
93
  }
94

95
  public static class GroupBuilder extends GroupMiniBuilder {
96

97
    protected Date createdAt;
98

99
    protected Date modifiedAt;
100

101
    public GroupBuilder(String id) {
UNCOV
102
      super(id);
×
103
    }
×
104

105
    public GroupBuilder createdAt(Date createdAt) {
UNCOV
106
      this.createdAt = createdAt;
×
UNCOV
107
      return this;
×
108
    }
109

110
    public GroupBuilder modifiedAt(Date modifiedAt) {
UNCOV
111
      this.modifiedAt = modifiedAt;
×
UNCOV
112
      return this;
×
113
    }
114

115
    @Override
116
    public GroupBuilder type(GroupBaseTypeField type) {
UNCOV
117
      this.type = new EnumWrapper<GroupBaseTypeField>(type);
×
UNCOV
118
      return this;
×
119
    }
120

121
    @Override
122
    public GroupBuilder type(EnumWrapper<GroupBaseTypeField> type) {
UNCOV
123
      this.type = type;
×
UNCOV
124
      return this;
×
125
    }
126

127
    @Override
128
    public GroupBuilder name(String name) {
UNCOV
129
      this.name = name;
×
UNCOV
130
      return this;
×
131
    }
132

133
    @Override
134
    public GroupBuilder groupType(GroupMiniGroupTypeField groupType) {
UNCOV
135
      this.groupType = new EnumWrapper<GroupMiniGroupTypeField>(groupType);
×
UNCOV
136
      return this;
×
137
    }
138

139
    @Override
140
    public GroupBuilder groupType(EnumWrapper<GroupMiniGroupTypeField> groupType) {
UNCOV
141
      this.groupType = groupType;
×
UNCOV
142
      return this;
×
143
    }
144

145
    public Group build() {
UNCOV
146
      return new Group(this);
×
147
    }
148
  }
149
}
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