Revert "Revert "add factory sample and junit dependency""

This reverts commit 90ca17f2d9cff2e6d6def89122ada25c513f36b0.