### Question:
SyncDecoder extends ActiveSyncDecoder { public SyncRequest decodeSync(Document doc) throws PartialException, ProtocolException, DaoException, CollectionPathException { Element root = doc.getDocumentElement(); SyncRequest.Builder requestBuilder = SyncRequest.builder() .waitInMinute(getWait(root)) .partial(isPartial(root)) .windowSize(getWindowSize(root)); NodeList collectionNodes = root.getElementsByTagName(SyncRequestFields.COLLECTION.getName()); for (int i = 0; i < collectionNodes.getLength(); i++) { requestBuilder.addCollection(getCollection((Element)collectionNodes.item(i))); } return requestBuilder.build(); } @Inject protected  SyncDecoder(DecoderFactory decoderFactory); SyncRequest decodeSync(Document doc); SyncResponse decodeSyncResponse(Document responseDocument);  }### Answer:
@Test public void testCollectionWhenNotPresent() throws Exception { Document request = DOMUtils.parse( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + "<Sync>" + "<Collections>" + "</Collections>" + "</Sync>"); SyncRequest syncRequest = new SyncDecoder(null).decodeSync(request); assertThat(syncRequest.getCollections()).isEmpty(); }