### Question:
AbstractLicenseMojo extends AbstractMojo { static String starEncrypt(String str) { if (str == null) { return null; } return str.replaceAll(".", "*"); }  @SuppressWarnings({"unchecked"}) final void execute(final Callback callback); final void info(String format, Object... params); final void debug(String format, Object... params); final void warn(String format, Object... params); Credentials findCredentials(String serverID); @Parameter
    public LicenseSet[] licenseSets; @Parameter(property = "license.basedir", defaultValue = "${basedir}", alias = "basedir", required = true)
    public File defaultBasedir; @Deprecated
    @Parameter(property = "license.header", alias = "header")
    public String legacyConfigHeader; @Deprecated
    @Parameter(property = "license.inlineHeader", alias="inlineHeader")
    public String legacyConfigInlineHeader; @Deprecated
    @Parameter(alias = "validHeaders")
    public String[] legacyConfigValidHeaders; @Deprecated
    @Parameter
    public Multi legacyConfigMulti; @Parameter(alias = "headerDefinitions")
    public String[] defaultHeaderDefinitions; @Deprecated
    @Parameter(alias = "headerSections")
    public HeaderSection[] legacyConfigHeaderSections; @Parameter(alias = "properties")
    public Map<String, String> defaultProperties; @Deprecated
    @Parameter(alias = "includes", property = "license.includes")
    public String[] legacyConfigIncludes; @Deprecated
    @Parameter(alias = "excludes", property = "license.excludes")
    public String[] legacyConfigExcludes; @Deprecated
    @Parameter(alias = "keywords")
    public String[] legacyConfigKeywords; @Parameter(property = "license.useDefaultExcludes", defaultValue = "true", alias = "useDefaultExcludes")
    public boolean defaultUseDefaultExcludes; @Parameter(property = "license.aggregate", defaultValue = "false")
    public boolean aggregate; @Parameter
    public LinkedHashMap<String, String> mapping; @Parameter(property = "license.useDefaultMapping", defaultValue = "true")
    public boolean useDefaultMapping; @Parameter(property = "license.concurrencyFactor", defaultValue = "1.5")
    public float concurrencyFactor; @Parameter(property = "license.nThreads", defaultValue = "0")
    public int nThreads; @Parameter(property = "license.skip", defaultValue = "false")
    public boolean skip; @Parameter(property = "license.quiet", defaultValue = "false")
    public boolean quiet; @Parameter(property = "license.strictCheck", defaultValue = "true")
    public boolean strictCheck; @Parameter(property = "license.encoding", defaultValue = "${project.build.sourceEncoding}")
    public String encoding; @Parameter(property = "license.failIfMissing", defaultValue = "true")
    public boolean failIfMissing; @Parameter(property = "license.failIfUnknown", defaultValue = "false")
    public boolean failIfUnknown; @Parameter(property = "license.dryRun", defaultValue = "false")
    public boolean dryRun; @Parameter(property = "license.skipExistingHeaders", defaultValue = "false")
    public boolean skipExistingHeaders; @Component
    public MavenProject project; }### Answer:
@Test public void test_StarEncryptMethodWorksAsExpected() { assertThat(AbstractLicenseMojo.starEncrypt("dummy"), is("*****")); assertThat(AbstractLicenseMojo.starEncrypt(null), nullValue()); String generatedPassword = UUID.randomUUID().toString(); assertThat(AbstractLicenseMojo.starEncrypt(generatedPassword), is(Strings.repeat("*", generatedPassword.length()))); }