Add test for code coverage and refactor DecoPlugin