@@ -0,0 +1,1121 @@
+/*%0A * To change this license header, choose License Headers in Project Properties.%0A * To change this template file, choose Tools %7C Templates%0A * and open the template in the editor.%0A */%0Apackage doublex.lib.locks;%0A%0A/**%0A *%0A * @author kenneth.lau%0A * @param %3CK%3E%0A */%0Apublic class UnitTestedLock%3CK%3E implements ILockable%3CK%3E %7B%0A%0A    private final ILockable%3CK%3E mLock;%0A%0A    public UnitTestedLock(final ILockable%3CK%3E lock) %7B%0A        mLock = lock;%0A    %7D%0A%0A    @Override%0A    public final boolean isLocked() %7B%0A        System.out.println(%0A                %22UnitTestedLock isLocked isLocked: %22 + mLock.isLocked());%0A        return mLock.isLocked();%0A    %7D%0A%0A    @Override%0A    public final void lock() %7B%0A        System.out.println(%22UnitTestedLock lock%22);%0A        mLock.lock();%0A        unitTestLock();%0A    %7D%0A%0A    @Override%0A    public final void tryUnlock(final K key) %7B%0A        System.out.println(%22UnitTestedLock tryUnlock key: %22 + key);%0A        mLock.tryUnlock(key);%0A    %7D%0A%0A    private void unitTestLock() %7B%0A        System.out.println(%22UnitTestedLock unitTestLock%22);%0A        System.out.println(mLock.isLocked() ? %22Passed!%22 : %22Failed!%22);%0A    %7D%0A%0A%7D%0A

Create UnitTestedLock.java