Rewrite test for plugin based on a legay one