• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2016 Google LLC
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *       http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package com.google.cloud.dns;
18 
19 import static org.junit.Assert.assertEquals;
20 import static org.junit.Assert.assertTrue;
21 
22 import com.google.api.core.ApiClock;
23 import com.google.api.gax.paging.Page;
24 import com.google.api.services.dns.model.Change;
25 import com.google.api.services.dns.model.ManagedZone;
26 import com.google.api.services.dns.model.ResourceRecordSet;
27 import com.google.cloud.ServiceOptions;
28 import com.google.cloud.dns.spi.DnsRpcFactory;
29 import com.google.cloud.dns.spi.v1.DnsRpc;
30 import com.google.common.collect.ImmutableList;
31 import com.google.common.collect.ImmutableMap;
32 import com.google.common.collect.Lists;
33 import java.util.Map;
34 import org.easymock.Capture;
35 import org.easymock.EasyMock;
36 import org.junit.After;
37 import org.junit.Before;
38 import org.junit.Test;
39 
40 public class DnsImplTest {
41 
42   // Dns entities
43   private static final String ZONE_NAME = "some zone name";
44   private static final String DNS_NAME = "example.com.";
45   private static final String DESCRIPTION = "desc";
46   private static final String CHANGE_ID = "some change id";
47   private static final RecordSet DNS_RECORD1 =
48       RecordSet.newBuilder("Something", RecordSet.Type.AAAA).build();
49   private static final RecordSet DNS_RECORD2 =
50       RecordSet.newBuilder("Different", RecordSet.Type.AAAA).build();
51   private static final Integer MAX_SIZE = 20;
52   private static final String PAGE_TOKEN = "some token";
53   private static final ZoneInfo ZONE_INFO = ZoneInfo.of(ZONE_NAME, DNS_NAME, DESCRIPTION);
54   private static final ProjectInfo PROJECT_INFO = ProjectInfo.newBuilder().build();
55   private static final ChangeRequestInfo CHANGE_REQUEST_PARTIAL =
56       ChangeRequestInfo.newBuilder().add(DNS_RECORD1).build();
57   private static final ChangeRequestInfo CHANGE_REQUEST_COMPLETE =
58       ChangeRequestInfo.newBuilder()
59           .add(DNS_RECORD1)
60           .setStartTime(123L)
61           .setStatus(ChangeRequest.Status.PENDING)
62           .setGeneratedId(CHANGE_ID)
63           .build();
64 
65   // Result lists
66   private static final DnsRpc.ListResult<Change> LIST_RESULT_OF_PB_CHANGES =
67       DnsRpc.ListResult.of(
68           "cursor",
69           ImmutableList.of(CHANGE_REQUEST_COMPLETE.toPb(), CHANGE_REQUEST_PARTIAL.toPb()));
70   private static final DnsRpc.ListResult<ManagedZone> LIST_RESULT_OF_PB_ZONES =
71       DnsRpc.ListResult.of("cursor", ImmutableList.of(ZONE_INFO.toPb()));
72   private static final DnsRpc.ListResult<ResourceRecordSet> LIST_OF_PB_DNS_RECORDS =
73       DnsRpc.ListResult.of("cursor", ImmutableList.of(DNS_RECORD1.toPb(), DNS_RECORD2.toPb()));
74 
75   // Field options
76   private static final Dns.ZoneOption ZONE_FIELDS =
77       Dns.ZoneOption.fields(Dns.ZoneField.CREATION_TIME);
78   private static final Dns.ProjectOption PROJECT_FIELDS =
79       Dns.ProjectOption.fields(Dns.ProjectField.QUOTA);
80   private static final Dns.ChangeRequestOption CHANGE_GET_FIELDS =
81       Dns.ChangeRequestOption.fields(Dns.ChangeRequestField.STATUS);
82 
83   // Listing options
84   private static final Dns.ZoneListOption[] ZONE_LIST_OPTIONS = {
85     Dns.ZoneListOption.pageSize(MAX_SIZE),
86     Dns.ZoneListOption.pageToken(PAGE_TOKEN),
87     Dns.ZoneListOption.fields(Dns.ZoneField.DESCRIPTION),
88     Dns.ZoneListOption.dnsName(DNS_NAME)
89   };
90   private static final Dns.ChangeRequestListOption[] CHANGE_LIST_OPTIONS = {
91     Dns.ChangeRequestListOption.pageSize(MAX_SIZE),
92     Dns.ChangeRequestListOption.pageToken(PAGE_TOKEN),
93     Dns.ChangeRequestListOption.fields(Dns.ChangeRequestField.STATUS),
94     Dns.ChangeRequestListOption.sortOrder(Dns.SortingOrder.ASCENDING)
95   };
96   private static final Dns.RecordSetListOption[] RECORD_SET_LIST_OPTIONS = {
97     Dns.RecordSetListOption.pageSize(MAX_SIZE),
98     Dns.RecordSetListOption.pageToken(PAGE_TOKEN),
99     Dns.RecordSetListOption.fields(Dns.RecordSetField.TTL),
100     Dns.RecordSetListOption.dnsName(DNS_NAME),
101     Dns.RecordSetListOption.type(RecordSet.Type.AAAA)
102   };
103 
104   // Other
105   private static final Map<DnsRpc.Option, ?> EMPTY_RPC_OPTIONS = ImmutableMap.of();
106   private static final ApiClock TIME_SOURCE =
107       new ApiClock() {
108         @Override
109         public long nanoTime() {
110           return 42_000_000_000L;
111         }
112 
113         @Override
114         public long millisTime() {
115           return 42_000L;
116         }
117       };
118 
119   private DnsOptions options;
120   private DnsRpcFactory rpcFactoryMock;
121   private DnsRpc dnsRpcMock;
122   private Dns dns;
123 
124   @Before
setUp()125   public void setUp() {
126     rpcFactoryMock = EasyMock.createMock(DnsRpcFactory.class);
127     dnsRpcMock = EasyMock.createMock(DnsRpc.class);
128     EasyMock.expect(rpcFactoryMock.create(EasyMock.anyObject(DnsOptions.class)))
129         .andReturn(dnsRpcMock);
130     EasyMock.replay(rpcFactoryMock);
131     options =
132         DnsOptions.newBuilder()
133             .setProjectId("projectId")
134             .setClock(TIME_SOURCE)
135             .setServiceRpcFactory(rpcFactoryMock)
136             .setRetrySettings(ServiceOptions.getNoRetrySettings())
137             .build();
138   }
139 
140   @After
tearDown()141   public void tearDown() throws Exception {
142     EasyMock.verify(rpcFactoryMock);
143   }
144 
145   @Test
testCreateZone()146   public void testCreateZone() {
147     EasyMock.expect(dnsRpcMock.create(ZONE_INFO.toPb(), EMPTY_RPC_OPTIONS))
148         .andReturn(ZONE_INFO.toPb());
149     EasyMock.replay(dnsRpcMock);
150     dns = options.getService(); // creates DnsImpl
151     Zone zone = dns.create(ZONE_INFO);
152     assertEquals(new Zone(dns, new ZoneInfo.BuilderImpl(ZONE_INFO)), zone);
153   }
154 
155   @Test
testCreateZoneWithOptions()156   public void testCreateZoneWithOptions() {
157     Capture<Map<DnsRpc.Option, Object>> capturedOptions = Capture.newInstance();
158     EasyMock.expect(
159             dnsRpcMock.create(EasyMock.eq(ZONE_INFO.toPb()), EasyMock.capture(capturedOptions)))
160         .andReturn(ZONE_INFO.toPb());
161     EasyMock.replay(dnsRpcMock);
162     dns = options.getService(); // creates DnsImpl
163     Zone zone = dns.create(ZONE_INFO, ZONE_FIELDS);
164     String selector = (String) capturedOptions.getValue().get(ZONE_FIELDS.getRpcOption());
165     assertEquals(new Zone(dns, new ZoneInfo.BuilderImpl(ZONE_INFO)), zone);
166     assertTrue(selector.contains(Dns.ZoneField.CREATION_TIME.getSelector()));
167     assertTrue(selector.contains(Dns.ZoneField.NAME.getSelector()));
168   }
169 
170   @Test
testGetZone()171   public void testGetZone() {
172     EasyMock.expect(dnsRpcMock.getZone(ZONE_INFO.getName(), EMPTY_RPC_OPTIONS))
173         .andReturn(ZONE_INFO.toPb());
174     EasyMock.replay(dnsRpcMock);
175     dns = options.getService(); // creates DnsImpl
176     Zone zone = dns.getZone(ZONE_INFO.getName());
177     assertEquals(new Zone(dns, new ZoneInfo.BuilderImpl(ZONE_INFO)), zone);
178   }
179 
180   @Test
testGetZoneWithOptions()181   public void testGetZoneWithOptions() {
182     Capture<Map<DnsRpc.Option, Object>> capturedOptions = Capture.newInstance();
183     EasyMock.expect(
184             dnsRpcMock.getZone(EasyMock.eq(ZONE_INFO.getName()), EasyMock.capture(capturedOptions)))
185         .andReturn(ZONE_INFO.toPb());
186     EasyMock.replay(dnsRpcMock);
187     dns = options.getService(); // creates DnsImpl
188     Zone zone = dns.getZone(ZONE_INFO.getName(), ZONE_FIELDS);
189     String selector = (String) capturedOptions.getValue().get(ZONE_FIELDS.getRpcOption());
190     assertEquals(new Zone(dns, new ZoneInfo.BuilderImpl(ZONE_INFO)), zone);
191     assertTrue(selector.contains(Dns.ZoneField.CREATION_TIME.getSelector()));
192     assertTrue(selector.contains(Dns.ZoneField.NAME.getSelector()));
193   }
194 
195   @Test
testDeleteZone()196   public void testDeleteZone() {
197     EasyMock.expect(dnsRpcMock.deleteZone(ZONE_INFO.getName())).andReturn(true);
198     EasyMock.replay(dnsRpcMock);
199     dns = options.getService(); // creates DnsImpl
200     assertTrue(dns.delete(ZONE_INFO.getName()));
201   }
202 
203   @Test
testGetProject()204   public void testGetProject() {
205     EasyMock.expect(dnsRpcMock.getProject(EMPTY_RPC_OPTIONS)).andReturn(PROJECT_INFO.toPb());
206     EasyMock.replay(dnsRpcMock);
207     dns = options.getService(); // creates DnsImpl
208     ProjectInfo projectInfo = dns.getProject();
209     assertEquals(PROJECT_INFO, projectInfo);
210   }
211 
212   @Test
testProjectGetWithOptions()213   public void testProjectGetWithOptions() {
214     Capture<Map<DnsRpc.Option, Object>> capturedOptions = Capture.newInstance();
215     EasyMock.expect(dnsRpcMock.getProject(EasyMock.capture(capturedOptions)))
216         .andReturn(PROJECT_INFO.toPb());
217     EasyMock.replay(dnsRpcMock);
218     dns = options.getService(); // creates DnsImpl
219     ProjectInfo projectInfo = dns.getProject(PROJECT_FIELDS);
220     String selector = (String) capturedOptions.getValue().get(PROJECT_FIELDS.getRpcOption());
221     assertEquals(PROJECT_INFO, projectInfo);
222     assertTrue(selector.contains(Dns.ProjectField.QUOTA.getSelector()));
223     assertTrue(selector.contains(Dns.ProjectField.PROJECT_ID.getSelector()));
224   }
225 
226   @Test
testGetChangeRequest()227   public void testGetChangeRequest() {
228     EasyMock.expect(
229             dnsRpcMock.getChangeRequest(
230                 ZONE_INFO.getName(), CHANGE_REQUEST_COMPLETE.getGeneratedId(), EMPTY_RPC_OPTIONS))
231         .andReturn(CHANGE_REQUEST_COMPLETE.toPb());
232     EasyMock.replay(dnsRpcMock);
233     dns = options.getService(); // creates DnsImpl
234     ChangeRequest changeRequest =
235         dns.getChangeRequest(ZONE_INFO.getName(), CHANGE_REQUEST_COMPLETE.getGeneratedId());
236     assertEquals(
237         new ChangeRequest(
238             dns, ZONE_INFO.getName(), new ChangeRequestInfo.BuilderImpl(CHANGE_REQUEST_COMPLETE)),
239         changeRequest);
240   }
241 
242   @Test
testGetChangeRequestWithOptions()243   public void testGetChangeRequestWithOptions() {
244     Capture<Map<DnsRpc.Option, Object>> capturedOptions = Capture.newInstance();
245     EasyMock.expect(
246             dnsRpcMock.getChangeRequest(
247                 EasyMock.eq(ZONE_INFO.getName()),
248                 EasyMock.eq(CHANGE_REQUEST_COMPLETE.getGeneratedId()),
249                 EasyMock.capture(capturedOptions)))
250         .andReturn(CHANGE_REQUEST_COMPLETE.toPb());
251     EasyMock.replay(dnsRpcMock);
252     dns = options.getService(); // creates DnsImpl
253     ChangeRequest changeRequest =
254         dns.getChangeRequest(
255             ZONE_INFO.getName(), CHANGE_REQUEST_COMPLETE.getGeneratedId(), CHANGE_GET_FIELDS);
256     String selector = (String) capturedOptions.getValue().get(CHANGE_GET_FIELDS.getRpcOption());
257     assertEquals(
258         new ChangeRequest(
259             dns, ZONE_INFO.getName(), new ChangeRequestInfo.BuilderImpl(CHANGE_REQUEST_COMPLETE)),
260         changeRequest);
261     assertTrue(selector.contains(Dns.ChangeRequestField.STATUS.getSelector()));
262     assertTrue(selector.contains(Dns.ChangeRequestField.ID.getSelector()));
263   }
264 
265   @Test
testApplyChangeRequest()266   public void testApplyChangeRequest() {
267     EasyMock.expect(
268             dnsRpcMock.applyChangeRequest(
269                 ZONE_INFO.getName(), CHANGE_REQUEST_PARTIAL.toPb(), EMPTY_RPC_OPTIONS))
270         .andReturn(CHANGE_REQUEST_COMPLETE.toPb());
271     EasyMock.replay(dnsRpcMock);
272     dns = options.getService(); // creates DnsImpl
273     ChangeRequest changeRequest =
274         dns.applyChangeRequest(ZONE_INFO.getName(), CHANGE_REQUEST_PARTIAL);
275     assertEquals(
276         new ChangeRequest(
277             dns, ZONE_INFO.getName(), new ChangeRequestInfo.BuilderImpl(CHANGE_REQUEST_COMPLETE)),
278         changeRequest);
279   }
280 
281   @Test
testApplyChangeRequestWithOptions()282   public void testApplyChangeRequestWithOptions() {
283     Capture<Map<DnsRpc.Option, Object>> capturedOptions = Capture.newInstance();
284     EasyMock.expect(
285             dnsRpcMock.applyChangeRequest(
286                 EasyMock.eq(ZONE_INFO.getName()),
287                 EasyMock.eq(CHANGE_REQUEST_PARTIAL.toPb()),
288                 EasyMock.capture(capturedOptions)))
289         .andReturn(CHANGE_REQUEST_COMPLETE.toPb());
290     EasyMock.replay(dnsRpcMock);
291     dns = options.getService(); // creates DnsImpl
292     ChangeRequest changeRequest =
293         dns.applyChangeRequest(ZONE_INFO.getName(), CHANGE_REQUEST_PARTIAL, CHANGE_GET_FIELDS);
294     String selector = (String) capturedOptions.getValue().get(CHANGE_GET_FIELDS.getRpcOption());
295     assertEquals(
296         new ChangeRequest(
297             dns, ZONE_INFO.getName(), new ChangeRequestInfo.BuilderImpl(CHANGE_REQUEST_COMPLETE)),
298         changeRequest);
299     assertTrue(selector.contains(Dns.ChangeRequestField.STATUS.getSelector()));
300     assertTrue(selector.contains(Dns.ChangeRequestField.ID.getSelector()));
301   }
302 
303   // lists
304   @Test
testListChangeRequests()305   public void testListChangeRequests() {
306     EasyMock.expect(dnsRpcMock.listChangeRequests(ZONE_INFO.getName(), EMPTY_RPC_OPTIONS))
307         .andReturn(LIST_RESULT_OF_PB_CHANGES);
308     EasyMock.replay(dnsRpcMock);
309     dns = options.getService(); // creates DnsImpl
310     Page<ChangeRequest> changeRequestPage = dns.listChangeRequests(ZONE_INFO.getName());
311     assertTrue(
312         Lists.newArrayList(changeRequestPage.getValues())
313             .contains(
314                 new ChangeRequest(
315                     dns,
316                     ZONE_INFO.getName(),
317                     new ChangeRequestInfo.BuilderImpl(CHANGE_REQUEST_COMPLETE))));
318     assertTrue(
319         Lists.newArrayList(changeRequestPage.getValues())
320             .contains(
321                 new ChangeRequest(
322                     dns,
323                     ZONE_INFO.getName(),
324                     new ChangeRequestInfo.BuilderImpl(CHANGE_REQUEST_PARTIAL))));
325     assertEquals(2, Lists.newArrayList(changeRequestPage.getValues()).size());
326   }
327 
328   @Test
testListChangeRequestsWithOptions()329   public void testListChangeRequestsWithOptions() {
330     Capture<Map<DnsRpc.Option, Object>> capturedOptions = Capture.newInstance();
331     EasyMock.expect(
332             dnsRpcMock.listChangeRequests(
333                 EasyMock.eq(ZONE_NAME), EasyMock.capture(capturedOptions)))
334         .andReturn(LIST_RESULT_OF_PB_CHANGES);
335     EasyMock.replay(dnsRpcMock);
336     dns = options.getService(); // creates DnsImpl
337     Page<ChangeRequest> changeRequestPage = dns.listChangeRequests(ZONE_NAME, CHANGE_LIST_OPTIONS);
338     assertTrue(
339         Lists.newArrayList(changeRequestPage.getValues())
340             .contains(
341                 new ChangeRequest(
342                     dns,
343                     ZONE_INFO.getName(),
344                     new ChangeRequestInfo.BuilderImpl(CHANGE_REQUEST_COMPLETE))));
345     assertTrue(
346         Lists.newArrayList(changeRequestPage.getValues())
347             .contains(
348                 new ChangeRequest(
349                     dns,
350                     ZONE_INFO.getName(),
351                     new ChangeRequestInfo.BuilderImpl(CHANGE_REQUEST_PARTIAL))));
352     assertEquals(2, Lists.newArrayList(changeRequestPage.getValues()).size());
353     Integer size = (Integer) capturedOptions.getValue().get(CHANGE_LIST_OPTIONS[0].getRpcOption());
354     assertEquals(MAX_SIZE, size);
355     String selector =
356         (String) capturedOptions.getValue().get(CHANGE_LIST_OPTIONS[1].getRpcOption());
357     assertEquals(PAGE_TOKEN, selector);
358     selector = (String) capturedOptions.getValue().get(CHANGE_LIST_OPTIONS[2].getRpcOption());
359     assertTrue(selector.contains(Dns.ChangeRequestField.STATUS.getSelector()));
360     assertTrue(selector.contains(Dns.ChangeRequestField.ID.getSelector()));
361     selector = (String) capturedOptions.getValue().get(CHANGE_LIST_OPTIONS[3].getRpcOption());
362     assertTrue(selector.contains(Dns.SortingOrder.ASCENDING.selector()));
363   }
364 
365   @Test
testListZones()366   public void testListZones() {
367     EasyMock.expect(dnsRpcMock.listZones(EMPTY_RPC_OPTIONS)).andReturn(LIST_RESULT_OF_PB_ZONES);
368     EasyMock.replay(dnsRpcMock);
369     dns = options.getService(); // creates DnsImpl
370     Page<Zone> zonePage = dns.listZones();
371     assertEquals(1, Lists.newArrayList(zonePage.getValues()).size());
372     assertEquals(
373         new Zone(dns, new ZoneInfo.BuilderImpl(ZONE_INFO)),
374         Lists.newArrayList(zonePage.getValues()).get(0));
375   }
376 
377   @Test
testListZonesWithOptions()378   public void testListZonesWithOptions() {
379     Capture<Map<DnsRpc.Option, Object>> capturedOptions = Capture.newInstance();
380     EasyMock.expect(dnsRpcMock.listZones(EasyMock.capture(capturedOptions)))
381         .andReturn(LIST_RESULT_OF_PB_ZONES);
382     EasyMock.replay(dnsRpcMock);
383     dns = options.getService(); // creates DnsImpl
384     Page<Zone> zonePage = dns.listZones(ZONE_LIST_OPTIONS);
385     assertEquals(1, Lists.newArrayList(zonePage.getValues()).size());
386     assertEquals(
387         new Zone(dns, new ZoneInfo.BuilderImpl(ZONE_INFO)),
388         Lists.newArrayList(zonePage.getValues()).get(0));
389     Integer size = (Integer) capturedOptions.getValue().get(ZONE_LIST_OPTIONS[0].getRpcOption());
390     assertEquals(MAX_SIZE, size);
391     String selector = (String) capturedOptions.getValue().get(ZONE_LIST_OPTIONS[1].getRpcOption());
392     assertEquals(PAGE_TOKEN, selector);
393     selector = (String) capturedOptions.getValue().get(ZONE_LIST_OPTIONS[2].getRpcOption());
394     assertTrue(selector.contains(Dns.ZoneField.DESCRIPTION.getSelector()));
395     assertTrue(selector.contains(Dns.ZoneField.NAME.getSelector()));
396     selector = (String) capturedOptions.getValue().get(ZONE_LIST_OPTIONS[3].getRpcOption());
397     assertEquals(DNS_NAME, selector);
398   }
399 
400   @Test
testListRecordSets()401   public void testListRecordSets() {
402     EasyMock.expect(dnsRpcMock.listRecordSets(ZONE_INFO.getName(), EMPTY_RPC_OPTIONS))
403         .andReturn(LIST_OF_PB_DNS_RECORDS);
404     EasyMock.replay(dnsRpcMock);
405     dns = options.getService(); // creates DnsImpl
406     Page<RecordSet> dnsPage = dns.listRecordSets(ZONE_INFO.getName());
407     assertEquals(2, Lists.newArrayList(dnsPage.getValues()).size());
408     assertTrue(Lists.newArrayList(dnsPage.getValues()).contains(DNS_RECORD1));
409     assertTrue(Lists.newArrayList(dnsPage.getValues()).contains(DNS_RECORD2));
410   }
411 
412   @Test
testListRecordSetsWithOptions()413   public void testListRecordSetsWithOptions() {
414     Capture<Map<DnsRpc.Option, Object>> capturedOptions = Capture.newInstance();
415     EasyMock.expect(
416             dnsRpcMock.listRecordSets(EasyMock.eq(ZONE_NAME), EasyMock.capture(capturedOptions)))
417         .andReturn(LIST_OF_PB_DNS_RECORDS);
418     EasyMock.replay(dnsRpcMock);
419     dns = options.getService(); // creates DnsImpl
420     Page<RecordSet> dnsPage = dns.listRecordSets(ZONE_NAME, RECORD_SET_LIST_OPTIONS);
421     assertEquals(2, Lists.newArrayList(dnsPage.getValues()).size());
422     assertTrue(Lists.newArrayList(dnsPage.getValues()).contains(DNS_RECORD1));
423     assertTrue(Lists.newArrayList(dnsPage.getValues()).contains(DNS_RECORD2));
424     Integer size =
425         (Integer) capturedOptions.getValue().get(RECORD_SET_LIST_OPTIONS[0].getRpcOption());
426     assertEquals(MAX_SIZE, size);
427     String selector =
428         (String) capturedOptions.getValue().get(RECORD_SET_LIST_OPTIONS[1].getRpcOption());
429     assertEquals(PAGE_TOKEN, selector);
430     selector = (String) capturedOptions.getValue().get(RECORD_SET_LIST_OPTIONS[2].getRpcOption());
431     assertTrue(selector.contains(Dns.RecordSetField.NAME.getSelector()));
432     assertTrue(selector.contains(Dns.RecordSetField.TTL.getSelector()));
433     selector = (String) capturedOptions.getValue().get(RECORD_SET_LIST_OPTIONS[3].getRpcOption());
434     assertEquals(RECORD_SET_LIST_OPTIONS[3].getValue(), selector);
435     String type =
436         (String) capturedOptions.getValue().get(RECORD_SET_LIST_OPTIONS[4].getRpcOption());
437     assertEquals(RECORD_SET_LIST_OPTIONS[4].getValue(), type);
438   }
439 }
440