////////////////////////////////////////////////////////////////////////////////
// checkstyle: Checks Java source code for adherence to a set of rules.
// Copyright (C) 2001-2015 the original author or authors.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
////////////////////////////////////////////////////////////////////////////////

package com.puppycrawl.tools.checkstyle.api;

import nl.jqno.equalsverifier.EqualsVerifier;
import org.junit.Test;

public class LocalizedMessageTest {
    @Test
    public void testEqualsAndHashCode() {
        EqualsVerifier.forClass(LocalizedMessage.class).usingGetClass().verify();
    }
}

@@ -1139,182 +1139,1120 @@
 nit.
-Test;%0A%0Apublic class LocalizedMessageTest %7B%0A    @Test%0A    public void testEqualsAndHashCode() %7B%0A        EqualsVerifier.forClass(LocalizedMessage.class).usingGetClass().verify(
+After;%0Aimport org.junit.Test;%0A%0Aimport java.util.Locale;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0Apublic class LocalizedMessageTest %7B%0A%0A    private static final Locale DEFAULT_LOCALE = Locale.getDefault();%0A%0A    @Test%0A    public void testEqualsAndHashCode() %7B%0A        EqualsVerifier.forClass(LocalizedMessage.class).usingGetClass().verify();%0A    %7D%0A%0A    @Test%0A    public void testEnforceEnglishLanguageBySettingUnitedStatesLocale() %7B%0A        Locale.setDefault(Locale.FRENCH);%0A        LocalizedMessage.setLocale(Locale.US);%0A        LocalizedMessage localizedMessage = createSampleLocalizedMessage();%0A%0A        assertEquals(%22Empty statement.%22, localizedMessage.getMessage());%0A    %7D%0A%0A    private static LocalizedMessage createSampleLocalizedMessage() %7B%0A        return new LocalizedMessage(0, %22com.puppycrawl.tools.checkstyle.checks.coding.messages%22,%0A                %22empty.statement%22, new Object%5B%5D%7B%7D, %22%22, LocalizedMessage.class, null);%0A    %7D%0A%0A    @After%0A    public void tearDown() %7B%0A        Locale.setDefault(DEFAULT_LOCALE);%0A        LocalizedMessage.clearCache();%0A        LocalizedMessage.setLocale(DEFAULT_LOCALE
 );%0A 

Add failing test showing that setting English does not work. #152