48
48
public class BundleLoaderTest {
49
49
private static final SnapshotVersion CREATE_TIME = new SnapshotVersion (Timestamp .now ());
50
50
51
- private final BundleListener bundleListener ;
51
+ private final BundleCallback bundleCallback ;
52
52
53
53
private final Set <DocumentKey > lastDocuments ;
54
54
private final Map <String , ImmutableSortedSet <DocumentKey >> lastQueries ;
@@ -59,8 +59,8 @@ public BundleLoaderTest() {
59
59
lastQueries = new HashMap <>();
60
60
lastBundles = new HashMap <>();
61
61
62
- bundleListener =
63
- new BundleListener () {
62
+ bundleCallback =
63
+ new BundleCallback () {
64
64
65
65
@ Override
66
66
public ImmutableSortedMap <DocumentKey , MaybeDocument > applyBundledDocuments (
@@ -92,7 +92,7 @@ public void before() {
92
92
@ Test
93
93
public void testLoadsDocuments () {
94
94
BundleLoader bundleLoader =
95
- new BundleLoader (bundleListener , createMetadata (/* documents= */ 2 ));
95
+ new BundleLoader (bundleCallback , createMetadata (/* documents= */ 2 ));
96
96
97
97
LoadBundleTaskProgress progress =
98
98
bundleLoader .addElement (
@@ -130,7 +130,7 @@ public void testLoadsDocuments() {
130
130
@ Test
131
131
public void testLoadsDeletedDocuments () {
132
132
BundleLoader bundleLoader =
133
- new BundleLoader (bundleListener , createMetadata (/* documents= */ 1 ));
133
+ new BundleLoader (bundleCallback , createMetadata (/* documents= */ 1 ));
134
134
135
135
LoadBundleTaskProgress progress =
136
136
bundleLoader .addElement (
@@ -148,7 +148,7 @@ public void testLoadsDeletedDocuments() {
148
148
@ Test
149
149
public void testAppliesDocumentChanges () {
150
150
BundleLoader bundleLoader =
151
- new BundleLoader (bundleListener , createMetadata (/* documents= */ 1 ));
151
+ new BundleLoader (bundleCallback , createMetadata (/* documents= */ 1 ));
152
152
153
153
bundleLoader .addElement (
154
154
new BundledDocumentMetadata (
@@ -165,7 +165,7 @@ public void testAppliesDocumentChanges() {
165
165
@ Test
166
166
public void testAppliesNamedQueries () {
167
167
BundleLoader bundleLoader =
168
- new BundleLoader (bundleListener , createMetadata (/* documents= */ 2 ));
168
+ new BundleLoader (bundleCallback , createMetadata (/* documents= */ 2 ));
169
169
170
170
bundleLoader .addElement (
171
171
new BundledDocumentMetadata (
@@ -203,7 +203,7 @@ public void testAppliesNamedQueries() {
203
203
@ Test
204
204
public void testVerifiesBundledDocumentMetadataSent () {
205
205
BundleLoader bundleLoader =
206
- new BundleLoader (bundleListener , createMetadata (/* documents= */ 1 ));
206
+ new BundleLoader (bundleCallback , createMetadata (/* documents= */ 1 ));
207
207
208
208
try {
209
209
bundleLoader .addElement (new BundleDocument (doc ("coll/doc1" , 1 , map ())), /* byteSize= */ 10 );
@@ -216,8 +216,7 @@ public void testVerifiesBundledDocumentMetadataSent() {
216
216
@ Test
217
217
public void testVerifiesBundledDocumentMetadataMatches () {
218
218
BundleLoader bundleLoader =
219
- new BundleLoader (bundleListener , createMetadata (/* documents= */ 1 ));
220
-
219
+ new BundleLoader (bundleCallback , createMetadata (/* documents= */ 1 ));
221
220
bundleLoader .addElement (
222
221
new BundledDocumentMetadata (
223
222
key ("coll/doc1" ), CREATE_TIME , /* exists= */ true , Collections .emptyList ()),
@@ -234,7 +233,7 @@ public void testVerifiesBundledDocumentMetadataMatches() {
234
233
@ Test
235
234
public void testVerifiesDocumentFollowsMetadata () {
236
235
BundleLoader bundleLoader =
237
- new BundleLoader (bundleListener , createMetadata (/* documents= */ 0 ));
236
+ new BundleLoader (bundleCallback , createMetadata (/* documents= */ 0 ));
238
237
239
238
bundleLoader .addElement (
240
239
new BundledDocumentMetadata (
@@ -254,7 +253,7 @@ public void testVerifiesDocumentFollowsMetadata() {
254
253
@ Test
255
254
public void testVerifiesDocumentCount () {
256
255
BundleLoader bundleLoader =
257
- new BundleLoader (bundleListener , createMetadata (/* documents= */ 2 ));
256
+ new BundleLoader (bundleCallback , createMetadata (/* documents= */ 2 ));
258
257
259
258
bundleLoader .addElement (
260
259
new BundledDocumentMetadata (
0 commit comments