Inject uiDirectory
Add junit tests