### Question:
CapabilityImpl implements Capability { @Override public String getWriteEnabler() { byte[] taggedmsg = { 't', 'h', 'i', 's', 'i', 's', 'h', 'm', 'a', 'c', 'f', 'o', 'r' }; if (this.type == CapabilityType.RW) { byte[] tmp = Cryptoutil.hmac(taggedmsg, this.key); byte[] tmp2 = new byte[16]; System.arraycopy(tmp, 0, tmp2, 0, tmp2.length); return Base32.encode(tmp2); } else { return null; } } CapabilityImpl();  CapabilityImpl(CapabilityType type, byte[] storageIndex, byte[] key,
			byte[] verificationKey, boolean isFile);  CapabilityImpl(CapabilityType type, byte[] key, byte[] verification,
			boolean isFile); @Override String getStorageIndex(); @Override byte[] getKey(); @Override CapabilityType getType(); void setStorageIndex(byte[] storageIndex); byte[] getStorageIndexByte(); @Override byte[] getVerificationKey(); @Override String toString(); static Capability fromString(String capability); @Override String getWriteEnabler(); @Override boolean isFolder(); @Override boolean isFile(); @Override void setVerification(byte[] verification);  }### Answer:
@Test public void testWriteEnablerGeneration() { Assert.assertNull(this.cap.getWriteEnabler()); CapabilityImpl capimpl = new CapabilityImpl(CapabilityType.RW, Cryptoutil.generateSymmetricKey().getEncoded(), null, false); Assert.assertNotNull(capimpl.getWriteEnabler()); }