text:
class CreateAnswers < ActiveRecord::Migration[5.1]
  def change
    create_table :answers do |t|
      t.string :poster
      t.string :contents
      t.references :question, foreign_key: true

      t.timestamps
    end
  end
end


text:
// ==========================================================================
//  Squidex Headless CMS
// ==========================================================================
//  Copyright (c) Squidex UG (haftungsbeschraenkt)
//  All rights reserved. Licensed under the MIT license.
// ==========================================================================

using Squidex.Domain.Apps.Core.Contents;
using Squidex.Domain.Apps.Core.TestHelpers;
using Squidex.Infrastructure;

namespace Squidex.Domain.Apps.Core.Model.Contents;

public class WorkflowsJsonTests
{
    [Fact]
    public void Should_serialize_and_deserialize()
    {
        var workflows = Workflows.Empty.Add(DomainId.NewGuid(), "my-workflow");

        var serialized = workflows.SerializeAndDeserialize();

        Assert.Equal(workflows, serialized);
    }
}

redpajama_set_name: RedPajamaGithub


text:
package org.apache.jackrabbit.oak.security.user.autosave;

import java.security.Principal;
import java.util.Iterator;
import javax.jcr.RepositoryException;

import org.apache.jackrabbit.api.security.user.Authorizable;
import org.apache.jackrabbit.api.security.user.Group;
import org.apache.jackrabbit.api.security.user.Query;
import org.apache.jackrabbit.api.security.user.User;
import org.apache.jackrabbit.api.security.user.UserManager;
import org.apache.jackrabbit.oak.api.CommitFailedException;
import org.apache.jackrabbit.oak.api.Root;
import org.apache.jackrabbit.oak.spi.security.user.util.UserUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

/**
 * Implementation of the user management that allows to set the autosave flag.
 * Since OAK does no longer support the auto-save flag out of the box and this
 * part of the user management is targeted for deprecation, this {@code UserManager}
 * implementation should only be used for those cases where strict backwards
 * compatibility is really required.
 *
 *
In general any consumer of the Jackrabbit user management API should stick
 * to the API contract and verify that the autosave flag is enabled before
 * relying on the implementation to have it turned on:

 *
 *

 *     JackrabbitSession session = ...;
 *     UserManager userManager = session.getUserManager();
 *
 *     // modify some user related content
 *
 *     if (!userManager#isAutosave()) {
 *         session.save();
 *     }
 *

 */
public class AutoSaveEnabledManager implements UserManager {

    private final UserManager dlg;
    private final Root root;
    private boolean autosave = true;

    public AutoSaveEnabledManager(UserManager dlg, Root root) {
        this.dlg = dlg;
        this.root = root;
    }

    @Override
    public Authorizable getAuthorizable(String id) throws RepositoryException {
        return wrap(dlg.getAuthorizable(id));
    }

    @Override
    public <T extends Authorizable> T getAuthorizable(String id, Class<T> authorizableClass) throws RepositoryException {
        return UserUtil.castAuthorizable(wrap(dlg.getAuthorizable(id)), authorizableClass);
    }

    @Override
    public Authorizable getAuthorizable(Principal principal) throws RepositoryException {
        return wrap(dlg.getAuthorizable(principal));
    }

    @Override
    public Authorizable getAuthorizableByPath(String path) throws RepositoryException {
        return wrap(dlg.getAuthorizableByPath(path));
    }

    @Override
    public Iterator<Authorizable> findAuthorizables(String relPath, String value) throws RepositoryException {
        return AuthorizableWrapper.createIterator(dlg.findAuthorizables(relPath, value), this);
    }

    @Override
    public Iterator<Authorizable> findAuthorizables(String relPath, String value, int searchType) throws RepositoryException {
        return AuthorizableWrapper.createIterator(dlg.findAuthorizables(relPath, value, searchType), this);
    }

    @Override
    public Iterator<Authorizable> findAuthorizables(Query query) throws RepositoryException {
        return AuthorizableWrapper.createIterator(dlg.findAuthorizables(query), this);
    }

    @Override
    public User createUser(String userID, String password) throws RepositoryException {
        try {
            return wrap(dlg.createUser(userID, password));
        } finally {
            autosave();
        }
    }

    @Override
    public User createUser(String userID, String password, Principal principal, @Nullable String intermediatePath) throws RepositoryException {
        try {
            return wrap(dlg.createUser(userID, password, principal, intermediatePath));
        } finally {
            autosave();
        }
    }

    @Override
    public User createSystemUser(String userID, String intermediatePath) throws RepositoryException {
        try {
            return wrap(dlg.createSystemUser(userID, intermediatePath));
        } finally {
            autosave();
        }
    }

    @Override
    public Group createGroup(String groupId) throws RepositoryException {
        try {
            return wrap(dlg.createGroup(groupId));
        } finally {
            autosave();
        }
    }

    @Override
    public Group createGroup(Principal principal) throws RepositoryException {
        try {
            return wrap(dlg.createGroup(principal));
        } finally {
            autosave();
        }
    }

    @Override
    public Group createGroup(Principal principal, String groupId) throws RepositoryException {
        try {
            return wrap(dlg.createGroup(principal, groupId));
        } finally {
            autosave();
        }
    }

    @Override
    public Group createGroup(String groupID, Principal principal, @Nullable String intermediatePath) throws RepositoryException {
        try {
            return wrap(dlg.createGroup(groupID, principal, intermediatePath));
        } finally {
            autosave();
        }
    }

    @Override
    public boolean isAutoSave() {
        return autosave;
    }

    @Override
    public void autoSave(boolean enable) {
        autosave = enable;
    }

    //--------------------------------------------------------------------------

    void autosave() throws RepositoryException {
        if (autosave) {
            try {
                root.commit();
            } catch (CommitFailedException e) {
                throw e.asRepositoryException();
            } finally {
                root.refresh();
            }
        }
    }

    @Nullable
    Authorizable wrap(@Nullable Authorizable authorizable) {
        if (authorizable == null) {
            return null;
        }
        if (authorizable.isGroup()) {
            return wrap((Group) authorizable);
        } else {
            return wrap((User) authorizable);
        }
    }

    @NotNull
    private User wrap(@NotNull User user) {
        return new UserImpl(user, this);
    }

    @NotNull
    private Group wrap(@NotNull Group group) {
        return new GroupImpl(group, this);
    }
}


text:
import re
import sys

regdelexp = re.compile('[-,.\/]')
regnumeric = re.compile('[0-9]+')

def split_line_by_delimiter(line,regex):
    splitline = []
    splititr = regex.finditer(line)
    lstart = 0
    for i in splititr:
        (mstart,mend) = i.span()
        if lstart != mstart:
            splitline.append(line[lstart:mstart])
        splitline.append(line[mstart:mend])
        lstart = mend
    linelen = len(line)
    if lstart != linelen:
        splitline.append(line[lstart:linelen])
    return splitline

def string_sort(x,y):
    xsplit = split_line_by_delimiter(x,regnumeric)
    ysplit = split_line_by_delimiter(y,regnumeric)
    ysplitlen = len(ysplit)
    xsplitlen = len(xsplit)
    minsplitlen = ysplitlen
    if xsplitlen < ysplitlen:
        minsplitlen = xsplitlen
    for i in range(minsplitlen):
        if xsplit[i] == ysplit[i]:
            continue
        if (xsplit[i].isdigit() and ysplit[i].isdigit()):
            rc = int(0)
            if int(xsplit[i]) > int(ysplit[i]):
                rc = -1
            if int(xsplit[i]) < int(ysplit[i]):
                rc = 1
            return rc
        if xsplit[i].isdigit():
            return -1
        if ysplit[i].isdigit():
            return 1
        if xsplit[i] > ysplit[i]:
            return -1
        if xsplit[i] < ysplit[i]:
            return 1
    if xsplitlen < ysplitlen:
        return 1
    if xsplitlen > ysplitlen:
        return -1
    return 0

def split_numeric_sort(x, y):
    xsplit = split_line_by_delimiter(x,regdelexp)
    ysplit = split_line_by_delimiter(y,regdelexp)
    ysplitlen = len(ysplit)
    xsplitlen = len(xsplit)
    minsplitlen = ysplitlen
    if xsplitlen < ysplitlen:
        minsplitlen = xsplitlen
    for i in range(minsplitlen):
        if xsplit[i] == ysplit[i]:
            continue
        if (xsplit[i].isdigit() and ysplit[i].isdigit()):
            rc = int(0)
            if int(xsplit[i]) > int(ysplit[i]):
                rc = -1
            if int(xsplit[i]) < int(ysplit[i]):
                rc = 1
            return rc
        if xsplit[i].isdigit():
            return -1
        if ysplit[i].isdigit():
            return 1
        rc = string_sort(xsplit[i],ysplit[i])
        if rc != 0:
            return rc
    if xsplitlen < ysplitlen:
        return 1
    if xsplitlen > ysplitlen:
        return -1
    return 0

def reverse_numeric(x, y):
    return split_numeric_sort( y,x)

class Version:
    def __init__(self, value):
        self.value = value

    def __eq__(self, other):
        return self.value == other.value

    def __lt__(self, other):
        return split_numeric_sort(self.value, other.value) > 0

    def __gt__(self, other):
        return split_numeric_sort(self.value, other.value) < 0

def main():
    lines = []
    for rawline in sys.stdin:
        lines.append(Version(rawline.strip()))
    lines.sort()
    for line in lines:
        print(line.value)


text:
<?php declare(strict_types = 1);

namespace Dms\Web\Laravel\Scaffold\CodeGeneration\Relation;

use Dms\Core\Model\Object\FinalizedPropertyDefinition;
use Dms\Core\Model\Object\ValueObject;
use Dms\Core\Model\Type\CollectionType;
use Dms\Core\Model\Type\ObjectType;
use Dms\Web\Laravel\Scaffold\CodeGeneration\PhpCodeBuilderContext;
use Dms\Web\Laravel\Scaffold\CodeGeneration\PropertyCodeGenerator;
use Dms\Web\Laravel\Scaffold\Domain\DomainObjectStructure;
use Dms\Web\Laravel\Scaffold\Domain\DomainStructure;
use Dms\Web\Laravel\Scaffold\ScaffoldCmsContext;
use Dms\Web\Laravel\Scaffold\ScaffoldPersistenceContext;

/**
 * @author Elliot Levin <elliotlevin@hotmail.com>
 */
class CustomValueObjectCollectionPropertyCodeGenerator extends PropertyCodeGenerator
{
    /**
     * @param DomainStructure             $domain
     * @param DomainObjectStructure       $object
     * @param FinalizedPropertyDefinition $property
     *
     * @return bool
     */
    protected function doesSupportProperty(DomainStructure $domain, DomainObjectStructure $object, FinalizedPropertyDefinition $property) : bool
    {
        return $property->getType()->isSubsetOf(ValueObject::collectionType());
    }

    /**
     * @param ScaffoldPersistenceContext  $context
     * @param PhpCodeBuilderContext       $code
     * @param DomainObjectStructure       $object
     * @param FinalizedPropertyDefinition $property
     * @param string                      $propertyReference
     * @param string                      $columnName
     */
    protected function doGeneratePersistenceMappingCode(
        ScaffoldPersistenceContext $context,
        PhpCodeBuilderContext $code,
        DomainObjectStructure $object,
        FinalizedPropertyDefinition $property,
        string $propertyReference,
        string $columnName
    ) {
        $code->getCode()->appendLine('$map->embeddedCollection(' . $propertyReference . ')');

        $code->getCode()->indent++;

        /** @var CollectionType $type */
        $type = $property->getType();
        /** @var ObjectType $elementType */
        $elementType = $type->getElementType();
        $valueObject = $context->getDomainStructure()->getObject($elementType->getClass());

        $tableName      = \Str::snake($object->getReflection()->getShortName()) . '_' . \Str::plural(\Str::snake($property->getName()));
        $primaryKeyName = 'id';
        $foreignKeyName = \Str::snake($object->getReflection()->getShortName()) . '_id';

        $code->getCode()->appendLine('->toTable(\'' . $tableName . '\')');
        $code->getCode()->appendLine('->withPrimaryKey(\'' . $primaryKeyName . '\')');
        $code->getCode()->appendLine('->withForeignKeyToParentAs(\'' . $foreignKeyName . '\')');

        if ($valueObject->hasEntityRelations()) {
            $code->addNamespaceImport($valueObject->getDefinition()->getClassName());
            $code->getCode()->append('->to(' . $valueObject->getReflection()->getShortName() . '::class)');
        } else {
            $relativeNamespace = $context->getRelativeObjectNamespace($valueObject);
            $mapperNamespace   = $context->getOutputImplementationNamespace() . ($relativeNamespace ? '\\' . $relativeNamespace : '');
            $mapperClass       = $mapperNamespace . '\\' . $valueObject->getReflection()->getShortName() . 'Mapper';

            $code->addNamespaceImport($mapperClass);
            $code->getCode()->append('->using(new ' . $this->getShortClassName($mapperClass) . '())');
        }

        $code->getCode()->indent--;
    }

    /**
     * @param ScaffoldCmsContext          $context
     * @param PhpCodeBuilderContext       $code
     * @param DomainObjectStructure       $object
     * @param FinalizedPropertyDefinition $property
     * @param string                      $propertyReference
     * @param string                      $fieldName
     * @param string                      $fieldLabel
     */
    protected function doGenerateCmsFieldCode(
        ScaffoldCmsContext $context,
        PhpCodeBuilderContext $code,
        DomainObjectStructure $object,
        FinalizedPropertyDefinition $property,
        string $propertyReference,
        string $fieldName,
        string $fieldLabel
    ) {
        /** @var CollectionType $type */
        $type = $property->getType();
        /** @var ObjectType $elementType */
        $elementType = $type->getElementType();
        $valueObject = $context->getDomainStructure()->getObject($elementType->getClass());

        $relativeNamespace = $context->getRelativeObjectNamespace($valueObject);
        $fieldNamespace    = $context->getValueObjectFieldNamespace() . ($relativeNamespace ? '\\' . $relativeNamespace : '');
        $fieldClass        = $fieldNamespace . '\\' . $valueObject->getReflection()->getShortName() . 'Field';

        $code->addNamespaceImport($valueObject->getDefinition()->getClassName());
        $code->addNamespaceImport($fieldClass);

        $code->getCode()->appendLine('Field::create(\'' . $fieldName . '\', \'' . $fieldLabel . '\')->arrayOfField(');

        $code->getCode()->indent++;

        $code->getCode()->appendLine('new ' . $this->getShortClassName($fieldClass) . '(\'' . $fieldName . '\', \'' . $fieldLabel . '\')');

        $code->getCode()->indent--;

        $code->getCode()->append(')->mapToCollection(' . $valueObject->getReflection()->getShortName() . '::collectionType())');
    }
}


text:
	if( globbed_filenames != NULL )
	{
#if defined( HAVE_WIDE_SYSTEM_CHARACTER )
		${library_name}_glob_wide_free(
		 globbed_filenames,
		 number_of_filenames,
		 NULL );
#else
		${library_name}_glob_free(
		 globbed_filenames,
		 number_of_filenames,
		 NULL );
#endif
	}


text:
package packageprivatemethods.b;

import packageprivatemethods.a.M1;

public class M2 extends M1 {
  String m() {
    return "b.M2.m";
  }

  public static String callM_b(M2 m) {
    return m.m();
  }
}


text:
var DateTimeInputInstance = (
  <div>
    <DateTimeInput daysOfWeekDisabled={[0, '', '', '', '', '', 6]} />
    <DateTimeInput date="2015-06-01" maxDate="2015-06-24" minDate="2015-05-21" />
  </div>
);

ReactDOM.render(DateTimeInputInstance, mountNode);


text:
package in.ohmama.omdailystorys.ui.activity;

import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.os.Handler;
import android.preference.PreferenceManager;

import in.ohmama.omdailystorys.OmApplication;
import in.ohmama.omdailystorys.R;
import in.ohmama.omdailystorys.util.LogUtil;

public class SplashActivity extends BaseActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_splash);
        // 读取设置
        SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this);
        boolean isNoPicMode = sharedPref.getBoolean(SettingActivity.KEY_NO_PIC_MODE, false);
        boolean isAutoDownload = sharedPref.getBoolean(SettingActivity.KEY_AUDO_DOWNLOAD_IN_WIFI, false);
        boolean isNightMode = sharedPref.getBoolean(SettingActivity.KEY_NIGHT_MODE, false);
        ((OmApplication) getApplication()).IS_NO_PIC = isNoPicMode;

//        ((OmApplication)getApplication()).setIsNoPicMode(isNoPicMode);
//        if(isNightMode){
//            setTheme(R.style.AppBaseTheme_Dark);
//        }else{
//            setTheme(R.style.AppBaseTheme_Light);
//        }

        //是否开启"离线下载"
//        if(isAutoDownload){
//            LogUtil.isay("离线下载,打开服务");
//            Intent intent = new Intent(this, StoryListService.class);
//            intent.putExtra(StoryListService.KEY_OFFLINE_MODE,true);
//            startService(intent);
//        }

        // 延时打开
        new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
//                Intent mainIntent = new Intent(SplashActivity.this, SinaLoginTestActivity.class);
                Intent mainIntent = new Intent(SplashActivity.this, StoryListActivity.class);
                SplashActivity.this.startActivity(mainIntent);
                SplashActivity.this.finish();
            }
        }, 500);
    }
}


text:
Compute the prime factors of a given natural number.

A prime number is only evenly divisible by itself and 1.

Note that 1 is not a prime number.

## Example

What are the prime factors of 60?

- Our first divisor is 2. 2 goes into 60, leaving 30.
- 2 goes into 30, leaving 15.
  - 2 doesn't go cleanly into 15. So let's move on to our next divisor, 3.
- 3 goes cleanly into 15, leaving 5.
  - 3 does not go cleanly into 5. The next possible factor is 4.
  - 4 does not go cleanly into 5. The next possible factor is 5.
- 5 does go cleanly into 5.
- We're left only with 1, so now, we're done.

Our successful divisors in that computation represent the list of prime
factors of 60: 2, 2, 3, and 5.

You can check this yourself:

- 2 \* 2 \* 3 * 5
- = 4 * 15
- = 60
- Success!


text:
package org.apache.eagle.storage.hbase.query.aggregate;

import org.apache.eagle.log.entity.AbstractHBaseLogReader;
import org.apache.eagle.log.entity.meta.EntityDefinition;
import org.apache.eagle.query.aggregate.AggregateCondition;
import org.apache.eagle.storage.hbase.query.coprocessor.impl.AggregateClientImpl;
import org.apache.eagle.query.aggregate.raw.GroupbyKeyValue;
import org.apache.eagle.storage.hbase.query.coprocessor.AggregateClient;
import org.apache.eagle.storage.hbase.query.coprocessor.AggregateResult;
import org.apache.hadoop.hbase.client.HTableInterface;
import org.apache.hadoop.hbase.client.Scan;
import org.apache.hadoop.hbase.filter.Filter;

import java.io.IOException;
import java.util.Date;
import java.util.List;

/**
 * @since : 11/7/14,2014
 */
public class GenericAggregateReader extends AbstractHBaseLogReader<List<GroupbyKeyValue>> {
	private final long startTime;
	private final long endTime;
	private AggregateClient aggregateClient = new AggregateClientImpl();
	private EntityDefinition ed;
	private final AggregateCondition aggregateCondition;
	private AggregateResult result;

	/**
	 *
	 * @param ed                Entity Definition
	 * @param partitions        Partition values
	 * @param startTime         Start time
	 * @param endTime           End time
	 * @param filter            HBase filter for scanning
	 * @param lastScanKey       Last HBase scan row key in String
	 * @param outputQualifiers  HBase output qualifiers in bytes
	 * @param condition         GroupAggregateCondition Object
	 *
	 * @see org.apache.eagle.query.aggregate.AggregateCondition
	 */
	@SuppressWarnings("unused")
	private GenericAggregateReader(EntityDefinition ed,
	                                List<String> partitions,
	                                Date startTime,
	                                Date endTime,
	                                Filter filter,
	                                String lastScanKey,
	                                byte[][] outputQualifiers,
	                                AggregateCondition condition) {
		super(ed, partitions, startTime, endTime, filter, lastScanKey, outputQualifiers);
		this.ed = ed;
		this.startTime = startTime.getTime();
		this.endTime = endTime.getTime();
		this.aggregateCondition = condition;
	}

	/**
	 *
	 * @param ed                Entity Definition
	 * @param partitions        Partition values
	 * @param startTime         Start time
	 * @param endTime           End time
	 * @param filter            HBase filter for scanning
	 * @param lastScanKey       Last HBase scan row key in String
	 * @param outputQualifiers  HBase output qualifiers in bytes
	 * @param prefix            HBase prefix, not necessary except for GenericMetric query
	 * @param condition         GroupAggregateCondition Object
	 *
	 * @see org.apache.eagle.query.aggregate.AggregateCondition
	 */
	public GenericAggregateReader(EntityDefinition ed,
	                               List<String> partitions,
	                               Date startTime,
	                               Date endTime,
	                               Filter filter,
	                               String lastScanKey,
	                               byte[][] outputQualifiers,
	                               String prefix,
	                               AggregateCondition condition) {
		super(ed, partitions, startTime, endTime, filter, lastScanKey, outputQualifiers, prefix);
		this.ed = ed;
		this.startTime = startTime.getTime();
		this.endTime = endTime.getTime();
		this.aggregateCondition = condition;
	}

	@Override
	protected void onOpen(HTableInterface tbl, Scan scan) throws IOException {
		this.result = this.aggregateClient.aggregate(
				tbl,
				this.ed,
				scan,
				this.aggregateCondition.getGroupbyFields(),
				this.aggregateCondition.getAggregateFunctionTypes(),
				this.aggregateCondition.getAggregateFields(),
				this.aggregateCondition.isTimeSeries(),
				this.startTime,
				this.endTime,
				this.aggregateCondition.getIntervalMS());
	}

	@Override
	public List<GroupbyKeyValue> read() throws IOException {
		return this.result.getKeyValues();
	}

	public long getFirstTimestamp() {
		return this.result.getStartTimestamp();
	}

	public long getLastTimestamp() {
		return this.result.getStopTimestamp();
	}
}


text:
package org.elasticsearch.discovery.zen;

import org.elasticsearch.cluster.ClusterState;

public interface PingContextProvider {

    /** return the current cluster state of the node */
    ClusterState clusterState();
}


text:
package Search::Elasticsearch::Role::Serializer;

use Moo::Role;

requires qw(encode decode encode_pretty encode_bulk mime_type);

1;

# ABSTRACT: An interface for Serializer modules

=head1 DESCRIPTION

There is no code in this module. It defines an interface for
Serializer implementations, and requires the following methods:

=over

=item *

C<encode()>

=item *

C<encode_pretty()>

=item *

C<encode_bulk()>

=item *

C<decode()>

=item *

C<mime_type()>

=back

See L<Search::Elasticsearch::Serializer::JSON> for more.


text:
package com.google.common.flogger;

import static com.google.common.flogger.util.Checks.checkNotNull;

import com.google.common.flogger.backend.Metadata;
import java.util.concurrent.ConcurrentHashMap;

/**
 * Provides per log site state for stateful fluent logging operations (e.g. rate limiting).
 *
 *
A log site map allows a logging API to efficiently, and safely, retrieve mutable log site
 * state. This state can then be updated according to the current log statement.
 *
 *
Note that values held in this map are expected to be mutable and must still be thread safe
 * themselves (the map protects only from concurrent lookup, not concurrent modification of the
 * state itself). It is also strongly advised that all implementations of log site state avoid using
 * locking (e.g. "synchronized" data structres) due to the risk of causing not trivial and
 * potentially harmful thread contention bottlenecks during logging.
 *
 *
This class is intended only for use by fluent logging APIs (subclasses of {@link LogContext}
 * and only used in the {@link LogContext#postProcess(LogSiteKey)} method, which supplies the key
 * appropriate for the current log statement.
 *
 * @param <V> The value type in the map.
 */
public abstract class LogSiteMap<V> {
  private final ConcurrentHashMap<LogSiteKey, V> concurrentMap =
      new ConcurrentHashMap<LogSiteKey, V>();

  protected LogSiteMap() {}

  /**
   * Implemented by subclasses to provide a new value for a newly added keys. This value is mapped
   * to the key and cannot be replaced, so it is expected to be mutable and must be thread safe.
   * All values in a {@code LogSiteMap} are expected to be the same type and have the same initial
   * state.
   */
  protected abstract V initialValue();

  // This method exists only for testing. Do not make this public.
  boolean contains(LogSiteKey key) {
    return concurrentMap.containsKey(key);
  }

  /**
   * Returns the mutable, thread safe, log site state for the given key to be read or updated during
   * the {@link LogContext#postProcess(LogSiteKey)} method.
   *
   *
Note that due to the possibility of log site key specialization, there may be more than one
   * value in the map for any given log site. This is intended and allows for things like per scope
   * rate limiting.
   */
  public final V get(LogSiteKey key, Metadata metadata) {
    V value = concurrentMap.get(key);
    if (value != null) {
      return value;
    }
    // Many threads can get here concurrently and attempt to add an initial value.
    value = checkNotNull(initialValue(), "initial map value");
    V race = concurrentMap.putIfAbsent(key, value);
    if (race != null) {
      return race;
    }
    // Only one thread gets here for each log site key added to this map.
    addRemovalHook(key, metadata);
    return value;
  }

  private void addRemovalHook(final LogSiteKey key, Metadata metadata) {
    Runnable removalHook = null;
    for (int i = 0, count = metadata.size(); i < count; i++) {
      if (!LogContext.Key.LOG_SITE_GROUPING_KEY.equals(metadata.getKey(i))) {
        continue;
      }
      Object groupByKey = metadata.getValue(i);
      if (!(groupByKey instanceof LoggingScope)) {
        continue;
      }
      if (removalHook == null) {
        // Non-static inner class references the outer LogSiteMap.
        removalHook = new Runnable() {
          @Override
          public void run() {
            concurrentMap.remove(key);
          }
        };
      }
      ((LoggingScope) groupByKey).onClose(removalHook);
    }
  }
}


text:
require "spec_helper"

RSpec.describe Glosbe::LanguageCode do
  describe "#normalize" do
    it "converts to string for unknown codes" do
      expect(Glosbe::LanguageCode.normalize(:xx)).to eq("xx")
    end

    it "converts to string for known codes" do
      expect(Glosbe::LanguageCode.normalize(:es)).to eq("es")
    end

    it "converts three character to two character" do
      expect(Glosbe::LanguageCode.normalize("nld")).to eq("nl")
      expect(Glosbe::LanguageCode.normalize("eng")).to eq("en")
      expect(Glosbe::LanguageCode.normalize("ger")).to eq("de")
    end

    it "passes through unknown three character" do
      expect(Glosbe::LanguageCode.normalize("xx")).to eq("xx")
    end

    it "passes through known two character" do
      expect(Glosbe::LanguageCode.normalize("fi")).to eq("fi")
    end

    it "passes through unknown two character" do
      expect(Glosbe::LanguageCode.normalize("zz")).to eq("zz")
    end

    it "converts languages with more than one three letter code" do
      expect(Glosbe::LanguageCode.normalize("mao")).to eq("mi")
      expect(Glosbe::LanguageCode.normalize("mri")).to eq("mi")
    end

    it "passes through nil" do
      expect(Glosbe::LanguageCode.normalize(nil)).to be_nil
    end
  end
end


text:
angular.module(PKG.name+'.feature.experimental')
  .config(function ($stateProvider) {
    $stateProvider
      .state('experimental', {
        parent: 'ns',
        url: '/experimental',
        abstract: true,
        templateUrl: '/assets/features/experimental/templates/experimental.html',
      })
        .state('experimental.home', {
          url: '',
          templateUrl: '/assets/features/experimental/templates/experiments-home.html',
          ncyBreadcrumb: {
            label: 'Experiments',
            parent: 'experimental'
          }
        })
        .state('experimental.uitemplate', {
          url: '/uitemplate',
          templateUrl: '/assets/features/experimental/templates/ui-template.html',
          ncyBreadcrumb: {
            label: 'UI Templates',
            parent: 'experimental.home'
          }
        })
        .state('experimental.directivesPlayground', {
          url: '/experimental-directives',
          templateUrl: '/assets/features/experimental/templates/directives-playground.html',
          ncyBreadcrumb: {
            label: 'Directives Playground',
            parent: 'experimental.home'
          }
        });

  });


text:
	<meta name="description" content="Hello! My name is Matthew Mellea and I'm an 18 year old student from the San Francisco Bay Area. I'm interested in mechanical engineering, robotics, machining, Computer Aided Design, entrepreneurship, and programming." />
	<link href='http://fonts.googleapis.com/css?family=Ovo' rel='stylesheet' type='text/css'>

	<link rel="shortcut icon" sizes="16x16 24x24 32x32 48x48 64x64" href="assets/icons/favicon-blue.ico">
	<link rel="stylesheet" href="http://www.w3schools.com/lib/w3.css">
	<link href="css/bootstrap.min.css" rel="stylesheet">

	 <link href="css/1-col-portfolio.css" rel="stylesheet">

	<link rel="stylesheet" type="text/css" href="/styles/style.css">

Matthew Mellea

Home

Portfolio

Resume


text:
static const int kStreamCloseDelayMs = 5000;

AudioManagerBase::AudioManagerBase()
    : audio_thread_("AudioThread"),
      initialized_(false) {
}

AudioManagerBase::~AudioManagerBase() {
  DCHECK(!audio_thread_.IsRunning());
}

void AudioManagerBase::Init() {
  initialized_ = audio_thread_.Start();
}

void AudioManagerBase::Cleanup() {
  if (initialized_) {
    initialized_ = false;
    audio_thread_.Stop();
  }
}

string16 AudioManagerBase::GetAudioInputDeviceModel() {
  return string16();
}

MessageLoop* AudioManagerBase::GetMessageLoop() {
  DCHECK(initialized_);
  return audio_thread_.message_loop();
}

AudioOutputStream* AudioManagerBase::MakeAudioOutputStreamProxy(
    const AudioParameters& params) {
  if (!initialized_)
    return NULL;

  scoped_refptr<AudioOutputDispatcher>& dispatcher =
      output_dispatchers_[params];
  if (!dispatcher)
    dispatcher = new AudioOutputDispatcher(this, params, kStreamCloseDelayMs);

  return new AudioOutputProxy(dispatcher);
}

bool AudioManagerBase::CanShowAudioInputSettings() {
  return false;
}

void AudioManagerBase::ShowAudioInputSettings() {
}


text:
package org.mvcspec.ozark.ext.thymeleaf;

import org.mvcspec.ozark.engine.ViewEngineConfig;
import org.thymeleaf.TemplateEngine;
import org.thymeleaf.templateresolver.ServletContextTemplateResolver;
import org.thymeleaf.templateresolver.ITemplateResolver;

import javax.enterprise.inject.Produces;
import javax.inject.Inject;
import javax.servlet.ServletContext;

/**
 * Producer for the TemplateEngine used by ThymeleafViewEngine.
 *
 * @author Christian Kaltepoth
 * @author Eddú Meléndez
 */
public class DefaultTemplateEngineProducer {

    @Inject
    private ServletContext servletContext;

    @Produces
    @ViewEngineConfig
    public TemplateEngine getTemplateEngine() {

        ITemplateResolver resolver = new ServletContextTemplateResolver(this.servletContext);

        TemplateEngine engine = new TemplateEngine();
        engine.setTemplateResolver(resolver);
        return engine;

    }

}


text:
package cluster

import (
	"encoding/json"
	"io/ioutil"
	"net/http"

	"github.com/rancher/norman/httperror"
	"github.com/rancher/norman/types"
	"github.com/rancher/norman/types/convert"
	"github.com/rancher/rancher/pkg/monitoring"
	v3 "github.com/rancher/types/apis/management.cattle.io/v3"
	v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

func (a ActionHandler) viewMonitoring(actionName string, action *types.Action, apiContext *types.APIContext) error {
	cluster, err := a.ClusterClient.Get(apiContext.ID, v1.GetOptions{})
	if err != nil {
		return httperror.WrapAPIError(err, httperror.NotFound, "none existent Cluster")
	}
	if cluster.DeletionTimestamp != nil {
		return httperror.NewAPIError(httperror.InvalidType, "deleting Cluster")
	}

	if !cluster.Spec.EnableClusterMonitoring {
		return httperror.NewAPIError(httperror.InvalidState, "disabling Monitoring")
	}

	// need to support `map[string]string` as entry value type in norman Builder.convertMap
	answers, version := monitoring.GetOverwroteAppAnswersAndVersion(cluster.Annotations)
	encodeAnswers, err := convert.EncodeToMap(answers)
	if err != nil {
		return httperror.WrapAPIError(err, httperror.ServerError, "failed to parse response")
	}
	resp := map[string]interface{}{
		"answers": encodeAnswers,
		"type":    "monitoringOutput",
	}
	if version != "" {
		resp["version"] = version
	}

	apiContext.WriteResponse(http.StatusOK, resp)
	return nil
}

func (a ActionHandler) editMonitoring(actionName string, action *types.Action, apiContext *types.APIContext) error {
	cluster, err := a.ClusterClient.Get(apiContext.ID, v1.GetOptions{})
	if err != nil {
		return httperror.WrapAPIError(err, httperror.NotFound, "none existent Cluster")
	}
	if cluster.DeletionTimestamp != nil {
		return httperror.NewAPIError(httperror.InvalidType, "deleting Cluster")
	}

	if !cluster.Spec.EnableClusterMonitoring {
		return httperror.NewAPIError(httperror.InvalidState, "disabling Monitoring")
	}

	data, err := ioutil.ReadAll(apiContext.Request.Body)
	if err != nil {
		return httperror.WrapAPIError(err, httperror.InvalidBodyContent, "unable to read request content")
	}
	var input v3.MonitoringInput
	if err = json.Unmarshal(data, &input); err != nil {
		return httperror.WrapAPIError(err, httperror.InvalidBodyContent, "failed to parse request content")
	}

	cluster = cluster.DeepCopy()
	cluster.Annotations = monitoring.AppendAppOverwritingAnswers(cluster.Annotations, string(data))

	_, err = a.ClusterClient.Update(cluster)
	if err != nil {
		return httperror.WrapAPIError(err, httperror.ServerError, "failed to upgrade monitoring")
	}

	apiContext.WriteResponse(http.StatusNoContent, map[string]interface{}{})
	return nil
}

func (a ActionHandler) enableMonitoring(actionName string, action *types.Action, apiContext *types.APIContext) error {
	cluster, err := a.ClusterClient.Get(apiContext.ID, v1.GetOptions{})
	if err != nil {
		return httperror.WrapAPIError(err, httperror.NotFound, "none existent Cluster")
	}
	if cluster.DeletionTimestamp != nil {
		return httperror.NewAPIError(httperror.InvalidType, "deleting Cluster")
	}

	if cluster.Spec.EnableClusterMonitoring {
		apiContext.WriteResponse(http.StatusNoContent, map[string]interface{}{})
		return nil
	}

	data, err := ioutil.ReadAll(apiContext.Request.Body)
	if err != nil {
		return httperror.WrapAPIError(err, httperror.InvalidBodyContent, "unable to read request content")
	}
	var input v3.MonitoringInput
	if err = json.Unmarshal(data, &input); err != nil {
		return httperror.WrapAPIError(err, httperror.InvalidBodyContent, "failed to parse request content")
	}

	cluster = cluster.DeepCopy()
	cluster.Spec.EnableClusterMonitoring = true
	cluster.Annotations = monitoring.AppendAppOverwritingAnswers(cluster.Annotations, string(data))

	_, err = a.ClusterClient.Update(cluster)
	if err != nil {
		return httperror.WrapAPIError(err, httperror.ServerError, "failed to enable monitoring")
	}

	apiContext.WriteResponse(http.StatusNoContent, map[string]interface{}{})
	return nil
}

func (a ActionHandler) disableMonitoring(actionName string, action *types.Action, apiContext *types.APIContext) error {
	cluster, err := a.ClusterClient.Get(apiContext.ID, v1.GetOptions{})
	if err != nil {
		return httperror.WrapAPIError(err, httperror.NotFound, "none existent Cluster")
	}
	if cluster.DeletionTimestamp != nil {
		return httperror.NewAPIError(httperror.InvalidType, "deleting Cluster")
	}

	if !cluster.Spec.EnableClusterMonitoring {
		apiContext.WriteResponse(http.StatusNoContent, map[string]interface{}{})
		return nil
	}

	cluster = cluster.DeepCopy()
	cluster.Spec.EnableClusterMonitoring = false

	_, err = a.ClusterClient.Update(cluster)
	if err != nil {
		return httperror.WrapAPIError(err, httperror.ServerError, "failed to disable monitoring")
	}

	apiContext.WriteResponse(http.StatusNoContent, map[string]interface{}{})
	return nil
}


text:
require_relative "includes"
require_relative "../../credentials/factories/default_chain_provider"

class AwsAssumeRole::Cli::Actions::SetEnvironment < AwsAssumeRole::Cli::Actions::AbstractAction
    include AwsAssumeRole::Ui

    SHELL_STRINGS = {
        sh: {
            env_command: "%<key>s=%<value>s; export %<key>s; ",
        },
        csh: {
            env_command: "setenv %<key>s %<value>s; ",
        },
        fish: {
            env_command: "set -x %<key>s %<value>s; ",
            footer: "commands.set_environment.shells.fish",
        },
        powershell: {
            env_command: "set-item ENV:%<key>s %<value>s; ",
            footer: "commands.set_environment.shells.powershell",
        },
    }.freeze

    CommandSchema = proc do
        optional(:profile).filled?
        optional(:region) { filled? > format?(REGION_REGEX) }
        optional(:serial_number) { filled? > format?(MFA_REGEX) }
        optional(:external_id) { filled? > format?(EXTERNAL_ID_REGEX) }
        required(:shell_type).value(included_in?: SHELL_STRINGS.stringify_keys.keys)
        required(:role_arn).maybe { filled? > format?(ROLE_REGEX) }
        required(:role_session_name).maybe { filled? > format?(ROLE_SESSION_NAME_REGEX) }
        required(:duration_seconds).maybe
        rule(role_specification: %i[profile role_arn role_session_name duration_seconds]) do |p, r, s, d|
            (p.filled? | p.empty? & r.filled?) & (r.filled? > s.filled? & d.filled?)
        end
    end

    def act_on(config)
        credentials = try_for_credentials config.to_h
        shell_strings = SHELL_STRINGS[config.shell_type.to_sym]
        str = String.new("")
        [
            [:access_key_id, "AWS_ACCESS_KEY_ID"],
            [:secret_access_key, "AWS_SECRET_ACCESS_KEY"],
            [:session_token, "AWS_SESSION_TOKEN"],
        ].each do |key|
            value = credentials.credentials.send key[0]
            next if value.blank?
            str << format(shell_strings[:env_command], key: key[1], value: value)
        end
        str << "# #{pastel.yellow t(shell_strings.fetch(:footer, 'commands.set_environment.shells.others'))}"
        puts str
    rescue KeyError, Aws::Errors::NoSuchProfileError
        error format(t("errors.NoSuchProfileError"), config.profile)
        raise
    rescue Aws::Errors::MissingCredentialsError
        error t("errors.MissingCredentialsError")
        raise
    end
end


text:
<!DOCTYPE html>

<meta charset="utf-8">
<title>Brython documentation</title>
<link rel="stylesheet" href="../doc_brython.css">


text:
title: "WASATCH CAMERA CLUB EXHIBIT"
date: "2000-01-01 21:04:16 -06:00"
categories:
- exhibit

subtitle: "Photography"
layout: "free-events"
event-image: "wasatch-camera-club-exhibit.jpg"
event-dates: "April 16 - May 9"
event-location: "Red Butte Garden"
button-type: "register"
tickets-link: ""
registration-info: "Questions?
Please call 801-585-0556"
instructor-info: "N/A"
member-cost: "Free"
public-cost: "No admission fee required to shop"
event-notes: ""
tickets-button: "hide"
refund-policy: "hide"
published: true
---

The Wasatch Camera Club presents "Natural Reflections" a beautiful photography exhibit reflecting natural landscapes, flowers, trees, mountains, and meadows.

The Wasatch Camera Club provides a rich and enjoyable environment for club members to improve their photography with six activities that support the Club's educational goal.
  These include: workshops, field trips, lectures, exhibits, competitions, and one-on-one mentoring. Join us for a better image.

For more please visit:

http://www.wasatchcameraclub.com/drupal/


text:
<!DOCTYPE html>

	<link href="js/bootstrap.min.css" rel="stylesheet"type="text/css">
	<link href="css/moncss.css" rel="stylesheet"type="text/css">

	<title>Comparison of integrated development environments -  WLanguage </title>
	<meta charset="utf-8">

Comparison of integrated development environments -  WLanguage

			<fieldset>

					<form action="" method="post">
						<legend style="color:red;font-weight: bold;font-style:italic;text-align: center;" >Formulaire</legend>

								WinDev :

 <input type="radio" name="FeatureWinDev" value="oui">Yes <input type="radio" name="FeatureWinDev" value = "non">No <input type="radio" name="FeatureWinDev" value = "non">Partial

											<input  style="display:none;" id ="id2WinDev"type="text"/>
										    <button class="btn btn-primary btn-xs" type="button" onClick="switchFunction('id1WinDev','id2WinDev');">Changer type</button>

								IDE :
 <input id="0" type="text" name="Feature">

<input type="submit" class="btn btn-info" value="Ajouter un produit" />
					</form>

			</fieldset>


text:
require_relative '../../lib/studio_game/berserk_player'

module StudioGame
  describe BerserkPlayer do
    let!(:initial_health) { 50 }
    before do
      $stdout = StringIO.new
      @berserk_player = BerserkPlayer.new "klutz", initial_health
    end

    it "goes berserk when w00ted more than 5 times" do
      6.times { @berserk_player.w00t }

      expect(@berserk_player.berserk?).to be_truthy
    end

    context "when it's gone berserk" do
      before { 6.times { @berserk_player.w00t } }

      it "gets w00ted instead of blammed" do
        3.times { @berserk_player.blam }

        expect(@berserk_player.health).to eq initial_health + (9*15)
      end
    end
  end
end


text:
========
Run Demo
========

Online demo
-----------

The demo server at Mozilla runs with *kinto-attachment* enabled.

An hosted version of this folder is hosted on [Github pages](http://kinto.github.io/kinto-attachment)
and can be used to play with the file feature.

Run the demo locally
--------------------

* Follow `the instructions in Kinto documentation <http://kinto.readthedocs.io>`_
to get a local instance running.

* Follow the instructions of this plugin to install and set the appropriate settings
  in ``config.ini``

We will serve the files locally, using these settings in config:

::

    kinto.attachment.base_path = /tmp
    kinto.attachment.base_url = http://localhost:7777

In a separate terminal, run a simple server to serve the uploaded files:

::

    cd /tmp/
    python -m SimpleHTTPServer 7777

Now start Kinto

::

    kinto --ini config.ini start

It should run on http://localhost:8888

Edit `demo/index.js` to set the `server` variable to `http://localhost:8888/v1`.

In a separate terminal, run a simple server to server the JavaScript demo app:

::

    cd demo/
    python -m SimpleHTTPServer 9999

* Navigate to http://localhost:9999 and post files!
* The links on uploaded files are served on http://localhost:7777


text:
import demistomock as demisto
from CommonServerPython import *
from CommonServerUserPython import *

from typing import Dict, Any

''' STANDALONE FUNCTION '''

def fix_nested_dicts(rules):
    for key, value in rules.items():
        if isinstance(value, dict):
            if members := value.get('member'):
                if isinstance(members, list):
                    new_members = ','.join(members)
                    rules[key] = new_members

def create_script_output(result):
    human_readable_arr = set()
    context = []

    for res in result:
        if isinstance(res, str):
            human_readable_arr.add(res)
        elif isinstance(res, dict):
            if target := res.get('DeviceSerial'):
                table_name = f'Matching Security Policies in `{target}` FW:'
            else:
                table_name = 'Matching Security Policies:'

            table = tableToMarkdown(table_name, res)
            human_readable_arr.add(table)
            context.append(res)

    human_readable = '\n\n'.join(human_readable_arr)

    return human_readable, context

def panorama_security_policy_match(args):
    res = []
    result = demisto.executeCommand('pan-os-security-policy-match', args=args)
    if 'The query did not match a Security policy' in result[0].get('Contents'):
        res = [f'The query for source: {args.get("source")}, destination: '
               f'{args.get("destination")} did not match a Security policy.']
    elif entry_context := result[0]['EntryContext']:
        policy_match = entry_context.get(
            'Panorama.SecurityPolicyMatch(val.Query == obj.Query && val.Device == obj.Device)')
        for entry in policy_match:
            if rules := entry.get('Rules'):
                fix_nested_dicts(rules)
                res.append(rules)
    elif is_error(result):
        res = [f'For the following arguments: {args}, pan-os-security-policy-match command failed to run: '
               f'Error: {get_error(result)}']
    else:
        res = result[0].get("Contents")
    return res

def wrapper_panorama_security_policy_match(destinations: list, sources: list, destination_ports: list, args: dict):
    results = []
    for source in sources:
        args['source'] = source
        for destination in destinations:
            args['destination'] = destination

            if destination_ports:
                for port in destination_ports:
                    args['destination-port'] = port
                    res = panorama_security_policy_match(args)
                    results.extend(res)
            else:
                res = panorama_security_policy_match(args)
                results.extend(res)

    return results

def wrapper_command(args: Dict[str, Any]):
    destinations = argToList(args.get('destination'))
    sources = argToList(args.get('source'))
    destination_ports = argToList(args.get('destination_port'))
    source_user = args.get('source_user')
    vsys = args.get('vsys')
    target = args.get('target')
    protocol = args.get('protocol')
    to_ = args.get('to')
    from_ = args.get('from')
    category = args.get('category')
    application = args.get('application')
    limit = arg_to_number(args.get('limit')) or 500

    vsys_num = len(argToList(vsys)) if vsys else 1
    target_num = len(argToList(target)) if target else 1
    ports_num = len(destination_ports) if destination_ports else 1

    if ports_num * len(destinations) * len(sources) * target_num * vsys_num > limit:    # type: ignore[operator]
        raise Exception(f'Provided arguments will cause more than {limit} API Requests. '
                        'If you wish to exceed the API limit, increase limit argument.')

    args = {
        'source-user': source_user,
        'vsys': vsys,
        'target': target,
        'protocol': protocol,
        'to': to_,
        'from': from_,
        'category': category,
        'application': application
    }

    command_args = assign_params(**args)

    result = wrapper_panorama_security_policy_match(destinations, sources, destination_ports, command_args)

    human_readable, context = create_script_output(result)

    return CommandResults(readable_output=human_readable,
                          outputs_key_field=['Action', 'Name', 'Category', 'Destination', 'From', 'Source', 'To',
                                             'DeviceSerial', 'Application'],
                          outputs=context,
                          outputs_prefix='Panorama.SecurityPolicyMatch.Rules')

def main():  # pragma: no cover
    try:
        return_results(wrapper_command(demisto.args()))
    except Exception as ex:
        return_error(f'Failed to execute PanoramaSecurityPolicyMatchWrapper. Error: {str(ex)}')

''' ENTRY POINT '''

if __name__ in ('__main__', '__builtin__', 'builtins'):
    main()


text:
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "ash/public/cpp/test/test_app_list_color_provider.h"

#include "ui/gfx/color_palette.h"

namespace ash {

SkColor TestAppListColorProvider::GetExpandArrowIconBaseColor() const {
  return gfx::kGoogleGrey200;
}

SkColor TestAppListColorProvider::GetExpandArrowIconBackgroundColor() const {
  return SkColorSetA(SK_ColorWHITE, 0x1A);
}

SkColor TestAppListColorProvider::GetAppListBackgroundColor(
    bool is_tablet_mode,
    SkColor default_color) const {
  return SkColorSetA(default_color,
                     is_tablet_mode ? 0x66 /*40%*/ : 0xCD /*80%*/);
}

SkColor TestAppListColorProvider::GetSearchBoxBackgroundColor() const {
  return gfx::kGoogleGrey900;
}

SkColor TestAppListColorProvider::GetSearchBoxCardBackgroundColor() const {
  return gfx::kGoogleGrey900;
}

SkColor TestAppListColorProvider::GetSearchBoxTextColor(
    SkColor default_color) const {
  return gfx::kGoogleGrey200;
}

SkColor TestAppListColorProvider::GetSearchBoxSecondaryTextColor(
    SkColor default_color) const {
  return gfx::kGoogleGrey500;
}

SkColor TestAppListColorProvider::GetSuggestionChipBackgroundColor() const {
  return SkColorSetA(SK_ColorWHITE, 0x1A);
}

SkColor TestAppListColorProvider::GetSuggestionChipTextColor() const {
  return gfx::kGoogleGrey200;
}

SkColor TestAppListColorProvider::GetAppListItemTextColor(
    bool is_in_folder) const {
  return gfx::kGoogleGrey200;
}

SkColor TestAppListColorProvider::GetFolderBackgroundColor() const {
  return gfx::kGoogleGrey900;
}

SkColor TestAppListColorProvider::GetFolderBubbleColor() const {
  return SkColorSetA(gfx::kGoogleGrey100, 0x7A);
}

SkColor TestAppListColorProvider::GetPageSwitcherButtonColor(
    bool is_root_app_grid_page_switcher) const {
  return gfx::kGoogleGrey700;
}

SkColor TestAppListColorProvider::GetSearchBoxIconColor(
    SkColor default_color) const {
  return gfx::kGoogleGrey200;
}

SkColor TestAppListColorProvider::GetFolderTitleTextColor() const {
  return gfx::kGoogleGrey200;
}

SkColor TestAppListColorProvider::GetFolderHintTextColor() const {
  return gfx::kGoogleGrey500;
}

SkColor TestAppListColorProvider::GetFolderNameBorderColor(bool active) const {
  if (!active)
    return SK_ColorTRANSPARENT;

  return SkColorSetA(SK_ColorBLACK, 0x0F);
}

SkColor TestAppListColorProvider::GetFolderNameSelectionColor() const {
  return SkColorSetA(SK_ColorBLACK, 0x0F);
}

SkColor TestAppListColorProvider::GetContentsBackgroundColor() const {
  return gfx::kGoogleGrey200;
}

SkColor TestAppListColorProvider::GetGridBackgroundCardActiveColor() const {
  return SkColorSetA(SK_ColorWHITE, 26 /* 10% */);
}

SkColor TestAppListColorProvider::GetGridBackgroundCardInactiveColor() const {
  return SkColorSetA(SK_ColorWHITE, 41 /* 16% */);
}

SkColor TestAppListColorProvider::GetSeparatorColor() const {
  return SkColorSetA(SK_ColorWHITE, 0x24);
}

SkColor TestAppListColorProvider::GetFocusRingColor() const {
  return gfx::kGoogleBlue600;
}

SkColor TestAppListColorProvider::GetInkDropBaseColor(SkColor bg_color) const {
  return SK_ColorWHITE;
}

float TestAppListColorProvider::GetInkDropOpacity(SkColor bg_color) const {
  return 0.08f;
}

SkColor TestAppListColorProvider::GetSearchResultViewHighlightColor() const {
  return SkColorSetA(SK_ColorWHITE, 0x0D);
}

SkColor TestAppListColorProvider::GetTextColorURL() const {
  return gfx::kGoogleBlue600;
}

}  // namespace ash


text:
package com.thoughtworks.go.domain;

import static com.thoughtworks.go.config.RunIfConfig.PASSED;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertThat;

import com.thoughtworks.go.config.RunIfConfig;
import org.junit.Test;

public class RunIfConfigsTest {

    @Test
    public void shouldMatchWhenContainsCondition() {
        RunIfConfigs configs = new RunIfConfigs(PASSED);
        assertThat(configs.match(RunIfConfig.fromJobResult(JobResult.Passed.toLowerCase())), is(true));
        assertThat(configs.match(RunIfConfig.fromJobResult(JobResult.Failed.toLowerCase())), is(false));
        assertThat(configs.match(RunIfConfig.fromJobResult(JobResult.Cancelled.toLowerCase())), is(false));
    }

    @Test
    public void shouldMatchAnyWhenAnyIsDefined() {
        RunIfConfigs configs = new RunIfConfigs(RunIfConfig.ANY);
        assertThat(configs.match(RunIfConfig.fromJobResult(JobResult.Passed.toLowerCase())), is(true));
        assertThat(configs.match(RunIfConfig.fromJobResult(JobResult.Failed.toLowerCase())), is(true));
        assertThat(configs.match(RunIfConfig.fromJobResult(JobResult.Cancelled.toLowerCase())), is(true));
    }

    @Test
    public void testOnlyMatchPassedWhenNoneIsDefined() {
        RunIfConfigs configs = new RunIfConfigs();
        assertThat(configs.match(RunIfConfig.fromJobResult(JobResult.Passed.toLowerCase())), is(true));
        assertThat(configs.match(RunIfConfig.fromJobResult(JobResult.Failed.toLowerCase())), is(false));
        assertThat(configs.match(RunIfConfig.fromJobResult(JobResult.Cancelled.toLowerCase())), is(false));
    }

    @Test
    public void shouldAddErrorsToErrorCollectionOfTheCollectionAsWellAsEachRunIfConfig() {
        RunIfConfigs configs = new RunIfConfigs();
        RunIfConfig config = new RunIfConfig("passed");
        config.addError("status", "some error");
        configs.add(config);
        configs.addError("key", "some error");
        assertThat(configs.errors().on("key"), is("some error"));
        assertThat(configs.get(0).errors().on("status"), is("some error"));
    }

}


text:
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wikidot="http://www.wikidot.com/rss-namespace">

	<channel>
		<title>Comments for page "Reaper Driving Gloves"</title>
		<link>http://bvs.wikidot.com/forum/t-208129/reaper-driving-gloves</link>
		<description>Posts in the discussion thread "Reaper Driving Gloves"</description>
				<copyright></copyright>
		<lastBuildDate>Sun, 10 Jul 2022 03:48:37 +0000</lastBuildDate>

					<item>
				<guid>http://bvs.wikidot.com/forum/t-208129#post-2034377</guid>
				<title>Disambiguation pages to work with Reaper Blood States</title>
				<link>http://bvs.wikidot.com/forum/t-208129/reaper-driving-gloves#post-2034377</link>
				<description></description>
				<pubDate>Sun, 18 May 2014 20:30:16 +0000</pubDate>
				<wikidot:authorName>tn5421</wikidot:authorName>				<wikidot:authorUserId>378091</wikidot:authorUserId>				<content:encoded>
					<![CDATA[

One of the item scripts links to:
 items:bankai-driving-gloves and items:shikai-driving-gloves
 and I imagine the cobra kai as well.

Can we make redirect pages with those urls and have them redirect to items:reaper-driving-gloves ??

				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://bvs.wikidot.com/forum/t-208129#post-836416</guid>
				<title>(no title)</title>
				<link>http://bvs.wikidot.com/forum/t-208129/reaper-driving-gloves#post-836416</link>
				<description></description>
				<pubDate>Sun, 25 Jul 2010 19:19:35 +0000</pubDate>
				<wikidot:authorName>RikaCovena</wikidot:authorName>								<content:encoded>
					<![CDATA[

Shikai +20% -2 All Levels +2 Dou Strength

Reaper Blood: Shikai gives -2 Levels, +2 G/N/T Strength.
 Reaper Gloves: Shikai gives +20% Tips, -2 Levels, +2 Dou Strength.
 Pretty useless unless you're way over-levelled and you really need dou strength.

In other words, being in Reaper Blood: Dormant is the best state you can be in with the gloves, not just for the extra 10% tips, but the fact it lacks a negative altogether.

				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://bvs.wikidot.com/forum/t-208129#post-732568</guid>
				<title>(no title)</title>
				<link>http://bvs.wikidot.com/forum/t-208129/reaper-driving-gloves#post-732568</link>
				<description></description>
				<pubDate>Tue, 23 Mar 2010 21:21:01 +0000</pubDate>
				<wikidot:authorName>Agent Inari</wikidot:authorName>				<wikidot:authorUserId>392886</wikidot:authorUserId>				<content:encoded>
					<![CDATA[

Yeah, but do the effects of the Reaper Blood perm and the Reaper Gloves perm stack? As in, Shikai giving overall -4 GNT levels, -2 D levels and +2 All strength? Or rather -2 all levels and +2 all strength?
 I thought it would be the later, but then I saw that the penalty listed for Cobra Kai is different.

				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://bvs.wikidot.com/forum/t-208129#post-665520</guid>
				<title>(no title)</title>
				<link>http://bvs.wikidot.com/forum/t-208129/reaper-driving-gloves#post-665520</link>
				<description></description>
				<pubDate>Fri, 01 Jan 2010 17:52:02 +0000</pubDate>
				<wikidot:authorName>Buretsu</wikidot:authorName>				<wikidot:authorUserId>112381</wikidot:authorUserId>				<content:encoded>
					<![CDATA[

Oh.

Well, the "Reaper Blood: <Blahblah>" Perm doesn't change. Only the Gloves do.

				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://bvs.wikidot.com/forum/t-208129#post-665513</guid>
				<title>(no title)</title>
				<link>http://bvs.wikidot.com/forum/t-208129/reaper-driving-gloves#post-665513</link>
				<description></description>
				<pubDate>Fri, 01 Jan 2010 17:16:22 +0000</pubDate>
				<wikidot:authorName>blueddict</wikidot:authorName>				<wikidot:authorUserId>192543</wikidot:authorUserId>				<content:encoded>
					<![CDATA[

I was actually asking about the same blood state. Bankai before and after Reaper Driving Gloves.

				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://bvs.wikidot.com/forum/t-208129#post-665511</guid>
				<title>(no title)</title>
				<link>http://bvs.wikidot.com/forum/t-208129/reaper-driving-gloves#post-665511</link>
				<description></description>
				<pubDate>Fri, 01 Jan 2010 17:02:31 +0000</pubDate>
				<wikidot:authorName>Buretsu</wikidot:authorName>				<wikidot:authorUserId>112381</wikidot:authorUserId>				<content:encoded>
					<![CDATA[

No. In the same way that each Blood State is a different Perm, each Glove is a different item, so the stats just get switched.

				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://bvs.wikidot.com/forum/t-208129#post-665480</guid>
				<title>(no title)</title>
				<link>http://bvs.wikidot.com/forum/t-208129/reaper-driving-gloves#post-665480</link>
				<description></description>
				<pubDate>Fri, 01 Jan 2010 15:44:32 +0000</pubDate>
				<wikidot:authorName>blueddict</wikidot:authorName>				<wikidot:authorUserId>192543</wikidot:authorUserId>				<content:encoded>
					<![CDATA[

Is the new cost of blood state additive to the original one?
 For example, Bankai:
 - original : -1 G/N/T Strength cost, +5 G/N/T levels reward.
 - new non-additive : -1 G/N/T/D Strength cost, +5 G/N/T levels +4 D levels reward.
 - new additive : -2 G/N/T strength -1 D strength cost, +5 G/N/T levels +4 D levels reward.

				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>


text:
<!doctype html>

<meta charset="UTF-8">
<title>Footer</title>
	<meta name="handheldfriendly" content="true">
	<meta name="mobileoptimized" content="240">
	<meta name="viewport" content="width=device-width,initial-scale=1">
	<link href='http://fonts.googleapis.com/css?family=Roboto:400,100,500' rel='stylesheet' type='text/css'>
	<link href="../css/typography.css" rel="stylesheet">
	<link href="../css/common.css" rel="stylesheet">
	<link href="../css/list-group.css" rel="stylesheet">
	<link href="../css/media-object.css" rel="stylesheet">
	<link href="../css/buttons.css" rel="stylesheet">
	<link href="../css/forms.css" rel="stylesheet">
	<link href="../css/grid.css" rel="stylesheet">
	<link href="../css/footer.css" rel="stylesheet">

Company Name

TWITTER

FACEBOOK

CONTACT


text:
/**
 * A pub/sub which is responsible for a single event type. A
 * multi-event type event bus is created by pubSub by collecting
 * several of these.
 *
 * @param {String} eventType
 *    the name of the events managed by this singleEventPubSub
 * @param {singleEventPubSub} [newListener]
 *    place to notify of new listeners
 * @param {singleEventPubSub} [removeListener]
 *    place to notify of when listeners are removed
 */
function singleEventPubSub(eventType, newListener, removeListener){

  /** we are optimised for emitting events over firing them.
   *  As well as the tuple list which stores event ids and
   *  listeners there is a list with just the listeners which
   *  can be iterated more quickly when we are emitting
   */
  var listenerTupleList,
      listenerList;

  function hasId(id){
    return function(tuple) {
      return tuple.id == id;
    };
  }

  return {

    /**
     * @param {Function} listener
     * @param {*} listenerId
     *    an id that this listener can later by removed by.
     *    Can be of any type, to be compared to other ids using ==
     */
    on:function( listener, listenerId ) {

      var tuple = {
        listener: listener
        ,  id:       listenerId || listener // when no id is given use the
        // listener function as the id
      };

      if( newListener ) {
        newListener.emit(eventType, listener, tuple.id);
      }

      listenerTupleList = cons( tuple,    listenerTupleList );
      listenerList      = cons( listener, listenerList      );

      return this; // chaining
    },

    emit:function () {
      applyEach( listenerList, arguments );
    },

    un: function( listenerId ) {

      var removed;

      listenerTupleList = without(
        listenerTupleList,
        hasId(listenerId),
        function(tuple){
          removed = tuple;
        }
      );

      if( removed ) {
        listenerList = without( listenerList, function(listener){
          return listener == removed.listener;
        });

        if( removeListener ) {
          removeListener.emit(eventType, removed.listener, removed.id);
        }
      }
    },

    listeners: function(){
      // differs from Node EventEmitter: returns list, not array
      return listenerList;
    },

    hasListener: function(listenerId){
      var test = listenerId? hasId(listenerId) : always;

      return defined(first( test, listenerTupleList));
    }
  };
}


text:
/
  public void testMessageInstance_SRC_P() {
    try {
      new Message(MSG_TITLE, MSG_BODY, MSG_SOURCE);
    } catch (Exception e) {
      fail("Fail to construct Message Class");
    }
  }

  /**
   * @since 2016-10-03
   * @see none
   * @objective Test 'getMessageId()' function with positive basic way
   * @target long getMessageId()
   * @test_data None
   * @pre_condition Construct Message class with title = "Test Title",
   *                contentTest = "Test Message Body", sourceName = "OCF"
   * @procedure Perform getMessageId() API
   * @post_condition None
   * @expected Should get messageId = 0
   */
  public void testGetMessageId_SRC_P() {
    assertEquals("Message ID should be 0 at initial stage", 0,
        mMessage.getMessageId());
  }

  /**
   * @since 2016-10-03
   * @see none
   * @objective Test 'getProviderId()' function with positive basic way
   * @target String getProviderId()
   * @test_data None
   * @pre_condition Construct Message class with title = "Test Title",
   *                contentTest = "Test Message Body", sourceName = "OCF"
   * @procedure Perform getProviderId() API
   * @post_condition None
   * @expected Should get providerId = null
   */
  public void testGetProviderId_SRC_P() {
    assertNull("Provider ID should be null at initial stage",
        mMessage.getProviderId());
  }

  /**
   * @since 2016-10-03
   * @see none
   * @objective Test 'getSourceName()' function with positive basic way
   * @target String getSourceName()
   * @test_data None
   * @pre_condition Construct Message class with title = "Test Title",
   *                contentTest = "Test Message Body", sourceName = "OCF"
   * @procedure Perform getSourceName() API
   * @post_condition None
   * @expected Should get sourceName = OCF
   */
  public void testGetSourceName_SRC_P() {
    assertEquals("Source should be OCF", MSG_SOURCE, mMessage.getSourceName());
  }

  /**
   * @since 2016-10-03
   * @see none
   * @objective Test 'getType()' function with positive basic way
   * @target MessageType getType()
   * @test_data None
   * @pre_condition Construct Message class with title = "Test Title",
   *                contentTest = "Test Message Body", sourceName = "OCF"
   * @procedure Perform getType() API
   * @post_condition None
   * @expected Should get Message type should be ALERT, EVENT, INFO or NOTICE
   */
  public void testGetType_SRC_P() {
    MessageType type = mMessage.getType();

    if (type == MessageType.ALERT || type == MessageType.EVENT
        || type == MessageType.INFO || type == MessageType.NOTICE) {
      Log.i(TAG, "Got Message type");
    } else {
      fail("Message type should be ALERT, EVENT, INFO or NOTICE");
    }
  }

  /**
   * @since 2016-10-03
   * @see none
   * @objective Test 'getTime()' function with positive basic way
   * @target String getTime()
   * @test_data None
   * @pre_condition Construct Message class with title = "Test Title",
   *                contentTest = "Test Message Body", sourceName = "OCF"
   * @procedure Perform getTime() API
   * @post_condition None
   * @expected Should get null as Time
   */
  public void testGetTime_SRC_P() {
    assertNull("Time should be null at initial stage", mMessage.getTime());
  }

  /**
   * @since 2016-10-03
   * @see none
   * @objective Test 'getTTL()' function with positive basic way
   * @target long getTTL()
   * @test_data None
   * @pre_condition Construct Message class with title = "Test Title",
   *                contentTest = "Test Message Body", sourceName = "OCF"
   * @procedure Perform getTTL() API
   * @post_condition None
   * @expected Should get 0 as TTL
   */
  public void testGetTTL_SRC_P() {
    assertEquals("TTL should be 0 at initial stage", 0, mMessage.getTTL());
  }

  /**
   * @since 2016-10-03
   * @see none
   * @objective Test 'getTitle()' function with positive basic way
   * @target String getTitle()
   * @test_data None
   * @pre_condition Construct Message class with title = "Test Title",
   *                contentTest = "Test Message Body", sourceName = "OCF"
   * @procedure Perform getTitle() API
   * @post_condition None
   * @expected Should get title = Test Title
   */
  public void testGetTitle_SRC_P() {
    assertEquals("Source should be OCF", MSG_TITLE, mMessage.getTitle());
  }

  /**
   * @since 2016-10-03
   * @see none
   * @objective Test 'getContentText()' function with positive basic way
   * @target String getContentText()
   * @test_data None
   * @pre_condition Construct Message class with title = "Test Title",
   *                contentTest = "Test Message Body", sourceName = "OCF"
   * @procedure Perform getContentText() API
   * @post_condition None
   * @expected Should get contentText = Test Message Body
   */
  public void testGetContentText_SRC_P() {
    assertEquals("Source should be OCF", MSG_BODY, mMessage.getContentText());
  }

  /**
   * @since 2016-10-03
   * @see none
   * @objective Test 'getMediaContents()' function with positive basic way
   * @target MediaContents getMediaContents()
   * @test_data None
   * @pre_condition Construct Message class with title = "Test Title",
   *                contentTest = "Test Message Body", sourceName = "OCF"
   * @procedure Perform getMediaContents() API
   * @post_condition None
   * @expected Should get MediaContents = null
   */
  public void testGetMediaContents_SRC_P() {
    assertNull("MediaContents should be null at initial stage",
        mMessage.getMediaContents());
  }

  /**
   * @since 2016-10-03
   * @see none
   * @objective Test 'getTopic()' function with positive basic way
   * @target String getTopic()
   * @test_data None
   * @pre_condition Construct Message class with title = "Test Title",
   *                contentTest = "Test Message Body", sourceName = "OCF"
   * @procedure Perform getTopic() API
   * @post_condition None
   * @expected Should get Topic = null
   */
  public void testGetTopic_SRC_P() {
    assertNull("Topic should be null at initial stage", mMessage.getTopic());
  }

  /**
   * @since 2016-10-03
   * @see none
   * @objective Test 'getSourceName()' function with positive basic way
   * @target String getSourceName()
   * @test_data sourceName = "TEST"
   * @pre_condition Construct Message class with title = "Test Title",
   *                contentTest = "Test Message Body", sourceName = "OCF"
   * @procedure 1. Perform setSourceName() with "TEST" 2. Perform
   *            getSourceName()
   * @post_condition None
   * @expected Should get sourceName = TEST
   */
  public void testSetSourceName_SRC_P() {
    String source = "TEST";

    mMessage.setSourceName(source);

    assertEquals("Source should be TEST", source, mMessage.getSourceName());
  }

  /**
   * @since 2016-10-03
   * @see MessageType getType()
   * @objective Test 'setType()' function with positive basic way
   * @target void setType()
   * @test_data MessageType = ALERT
   * @pre_condition Construct Message class with title = "Test Title",
   *                contentTest = "Test Message Body", sourceName = "OCF"
   * @procedure 1. Perform setType() API with ALERT 2. Perform getType() API
   * @post_condition None
   * @expected Should get Message type should be ALERT
   */
  public void testSetTypeAsAlert_SRC_P() {
    mMessage.setType(MessageType.ALERT);

    assertEquals("Message type should be ALERT", MessageType.ALERT,
        mMessage.getType());
  }

  /**
   * @since 2016-10-03
   * @see MessageType getType()
   * @objective Test 'setType()' function with positive basic way
   * @target void setType()
   * @test_data MessageType = EVENT
   * @pre_condition Construct Message class with title = "Test Title",
   *                contentTest = "Test Message Body", sourceName = "OCF"
   * @procedure 1. Perform setType() API with ALERT 2. Perform getType() API
   * @post_condition None
   * @expected Should get Message type should be EVENT
   */
  public void testSetTypeAsEvent_SRC_P() {
    mMessage.setType(MessageType.EVENT);

    assertEquals("Message type should be EVENT", MessageType.EVENT,
        mMessage.getType());
  }

  /**
   * @since 2016-10-03
   * @see MessageType getType()
   * @objective Test 'setType()' function with positive basic way
   * @target void setType()
   * @test_data MessageType = INFO
   * @pre_condition Construct Message class with title = "Test Title",
   *                contentTest = "Test Message Body", sourceName = "OCF"
   * @procedure 1. Perform setType() API with INFO 2. Perform getType() API
   * @post_condition None
   * @expected Should get Message type should be INFO
   */
  public void testSetTypeAsInfo_SRC_P() {
    mMessage.setType(MessageType.INFO);

    assertEquals("Message type should be INFO", MessageType.INFO,
        mMessage.getType());
  }

  /**
   * @since 2016-10-03
   * @see MessageType getType()
   * @objective Test 'setType()' function with positive basic way
   * @target void setType()
   * @test_data MessageType = NOTICE
   * @pre_condition Construct Message class with title = "Test Title",
   *                contentTest = "Test Message Body", sourceName = "OCF"
   * @procedure 1. Perform setType() API with NOTICE 2. Perform getType() API
   * @post_condition None
   * @expected Should get Message type should be NOTICE
   */
  public void testSetTypeAsNotice_SRC_P() {
    mMessage.setType(MessageType.NOTICE);

    assertEquals("Message type should be NOTICE", MessageType.NOTICE,
        mMessage.getType());
  }

  /**
   * @since 2016-10-03
   * @see String getTime()
   * @objective Test 'setTime()' function with positive basic way
   * @target void setTime()
   * @test_data time = "12:00"
   * @pre_condition Construct Message class with title = "Test Title",
   *                contentTest = "Test Message Body", sourceName = "OCF"
   * @procedure 1. Perform setTime() API with "12:00" 2. Perform getTime() API
   * @post_condition None
   * @expected Should get 12:00 as Time
   */
  public void testSetTime_SRC_P() {
    String time = "12:00";

    mMessage.setTime(time);
    assertEquals("Time should be 12:00 after set", time, mMessage.getTime());
  }

  /**
   * @since 2016-10-03
   * @see long getTTL()
   * @objective Test 'setTTL()' function with positive basic way
   * @target void setTTL()
   * @test_data ttl = 20
   * @pre_condition Construct Message class with title = "Test Title",
   *                contentTest = "Test Message Body", sourceName = "OCF"
   * @procedure 1. Set TTL with 20; 2. Perform getTTL() API
   * @post_condition None
   * @expected Should get 20 as TTL
   */
  public void testSetTTL_SRC_P() {
    long ttl = 20;

    mMessage.setTTL(ttl);

    assertEquals("TTL should be " + ttl, ttl, mMessage.getTTL());
  }

  /**
   * @since 2016-10-03
   * @see String getTitle()
   * @objective Test 'setTitle()' function with positive basic way
   * @target void setTitle()
   * @test_data title = "TEST_TITLE"
   * @pre_condition Construct Message class with title = "Test Title",
   *                contentTest = "Test Message Body", sourceName = "OCF"
   * @procedure 1. setTitle as "TEST_TITLE" 2. Perform getTitle() API
   * @post_condition None
   * @expected Should get title = TEST_TITLE
   */
  public void testSetTitle_SRC_P() {
    String title = "TEST_TITLE";

    mMessage.setTitle(title);
    assertEquals("Source should be same as setted", title, mMessage.getTitle());
  }

  /**
   * @since 2016-10-04
   * @see none
   * @objective Test 'getContentText()' function with positive basic way
   * @target String getContentText()
   * @test_data contentText = "TEST_CONTENT"
   * @pre_condition Construct Message class with title = "Test Title",
   *                contentTest = "Test Message Body", sourceName = "OCF"
   * @procedure 1. setContentText as "TEST_TITLE" 2. Perform getContentText()
   *            API
   * @post_condition None
   * @expected Should get contentText = "TEST_CONTENT"
   */
  public void testSetContentText_SRC_P() {
    String content = "TEST_CONTENT";

    mMessage.setContentText(content);

    assertEquals("Source should be OCF", content, mMessage.getContentText());
  }

  /**
   * @since 2016-10-04
   * @see none
   * @objective Test 'getMediaContents()' function with positive basic way
   * @target MediaContents getMediaContents()
   * @test_data None
   * @pre_condition 1. Construct Message class with title = "Test Title",
   *                contentTest = "Test Message Body", sourceName = "OCF" 2.
   * @procedure Perform getMediaContents() API
   * @post_condition None
   * @expected Should not get null MediaContents
   */
  public void testSetMediaContents_SRC_P() {
    MediaContents mediaContents = new MediaContents(ICON_IMG);

    mMessage.setMediaContents(mediaContents);
    assertNotNull("MediaContents should not be", mMessage.getMediaContents());
  }

  /**
   * @since 2016-10-04
   * @see String getTopic()
   * @objective Test 'setTopic()' function with positive basic way
   * @target void setTopic()
   * @test_data topic = "TEST_TOPIC"
   * @pre_condition Construct Message class with title = "Test Title",
   *                contentTest = "Test Message Body", sourceName = "OCF"
   * @procedure 1. Set topic with "TEST_TOPIC" 2. Perform getTopic() API
   * @post_condition None
   * @expected Should get Topic = "TEST_TOPIC"
   */
  public void testSetTopic_SRC_P() {
    String topic = "TEST_TOPIC";

    mMessage.setTopic(topic);

    assertEquals("Topic should be " + topic, topic, mMessage.getTopic());
  }

  /**
   * @since 2016-10-04
   * @see none
   * @objective Test 'MediaContents()' function with positive basic way
   * @target MediaContents()
   * @test_data iconImage = "media/img.jpg"
   * @pre_condition None
   * @procedure Perform MediaContents() API
   * @post_condition None
   * @expected Should not throw any exception
   */
  public void testMediaContentsInstance_SRC_P() {
    try {
      new MediaContents(ICON_IMG);
    } catch (Exception e) {
      fail("Should not throw any exception");
    }
  }

  /**
   * @since 2016-10-04
   * @see none
   * @objective Test 'getIconImage()' function with positive basic way
   * @target String getIconImage()
   * @test_data None
   * @pre_condition Create MediaContents instance with "media/img.jpg"
   * @procedure Perform getIconImage() API
   * @post_condition None
   * @expected Should get "media/img.jpg"
   */
  public void testGetIconImage_SRC_P() {
    MediaContents mediaContents = new MediaContents(ICON_IMG);

    assertEquals("Should get the iconImage", ICON_IMG,
        mediaContents.getIconImage());
  }

  /**
   * @since 2016-10-04
   * @see String getIconImage()
   * @objective Test 'setIconImage()' function with positive basic way
   * @target void setIconImage()
   * @test_data iconImage = "test.png"
   * @pre_condition Create MediaContents instance with "media/img.jpg"
   * @procedure 1. Set Icon Image with test_data 2. Perform getIconImage() API
   * @post_condition None
   * @expected Should get same iconImage as set
   */
  public void testSetIconImage_SRC_P() {
    MediaContents mediaContents = new MediaContents(ICON_IMG);

    String iconImg = "test.png";
    mediaContents.setIconImage(iconImg);

    assertEquals("Should get the iconImage", iconImg,
        mediaContents.getIconImage());
  }

  /**
   * @since 2016-10-04
   * @see None
   * @objective Test 'SyncInfo()' constructor with positive basic way
   * @target SyncInfo()
   * @test_data message_id = 1000, provider_id = "TEST_001", SyncType = READ
   * @pre_condition None
   * @procedure Create instance of SyncInfo
   * @post_condition None
   * @expected Should not throw any exception
   */
  public void testSyncInfoInstance_SRC_P() {
    try {
      new SyncInfo(MESSAGE_ID, PROVIDER_ID, SyncType.READ);
    } catch (Exception e) {
      fail("Exception occurs when calling SyncInfo() constructor");
    }
  }

  /**
   * @since 2016-10-04
   * @see None
   * @objective Test 'getMessageId()' function with positive basic way
   * @target long getMessageId()
   * @test_data None
   * @pre_condition Create instance of SyncInfo with message_id = 1000,
   *                provider_id = "TEST_001", SyncType = READ
   * @procedure Perform getMessageId() API
   * @post_condition None
   * @expected Should return same value as construct method
   */
  public void testSyncInfoGetMessageId_SRC_P() {
    SyncInfo syncInfo = new SyncInfo(MESSAGE_ID, PROVIDER_ID, SyncType.READ);

    assertEquals("SyncInfo MessageID doesn't match", MESSAGE_ID,
        syncInfo.getMessageId());
  }

  /**
   * @since 2016-10-04
   * @see None
   * @objective Test 'getProviderId()' function with positive basic way
   * @target String getProviderId()
   * @test_data None
   * @pre_condition Create instance of SyncInfo with message_id = 1000,
   *                provider_id = "TEST_001", SyncType = READ
   * @procedure Perform getProviderId() API
   * @post_condition None
   * @expected Should return same value as construct method
   */
  public void testSyncInfoGetProviderId_SRC_P() {
    SyncInfo syncInfo = new SyncInfo(MESSAGE_ID, PROVIDER_ID, SyncType.READ);

    assertEquals("SyncInfo ProviderID doesn't match", PROVIDER_ID,
        syncInfo.getProviderId());
  }

  /**
   * @since 2016-10-04
   * @see None
   * @objective Test 'getState()' function with positive basic way
   * @target SyncType getState()
   * @test_data None
   * @pre_condition Create instance of SyncInfo with message_id = 1000,
   *                provider_id = "TEST_001", SyncType = READ
   * @procedure Perform getState() API
   * @post_condition None
   * @expected Should return same value as construct method
   */
  public void testSyncInfoGetSyncState_SRC_P() {
    SyncInfo syncInfo = new SyncInfo(MESSAGE_ID, PROVIDER_ID, SyncType.READ);

    assertEquals("SyncInfo Sync State doesn't match", SyncType.READ,
        syncInfo.getState());
  }

  /**
   * @since 2016-10-04
   * @see None
   * @objective Test 'getTopicName()' function with positive basic way
   * @target String getTopicName()
   * @test_data None
   * @pre_condition Create instance of Topic with topicName = "TestTopic", TopicState = UNSUBSCRIBED
   * @procedure Perform getTopicName() API
   * @post_condition None
   * @expected Should return same value as constructed method
   */
  public void testGetTopicName_SRC_P() {
    Topic topic = new Topic(TOPIC_NAME, TopicState.UNSUBSCRIBED);

    assertEquals("Topic Name is not same in getTopicName api", TOPIC_NAME, topic.getTopicName());
  }

  /**
   * @since 2016-10-04
   * @see String getTopicName()
   * @objective Test 'setTopicName()' function with positive basic way
   * @target void setTopicName(String topicName)
   * @test_data topicName = "TEST_TOPIC"
   * @pre_condition Create instance of Topic with topicName = "TestTopic", TopicState = UNSUBSCRIBED
   * @procedure 1. Perform setTopicName() API
   *            2. Perform getTopicName() API
   * @post_condition None
   * @expected Should return same value as set value
   */
  public void testSetTopicName_SRC_P() {
    Topic topic = new Topic(TOPIC_NAME, TopicState.UNSUBSCRIBED);
    String topicName = "TEST_TOPIC";
    topic.setTopicName(topicName);

    assertEquals("Topic Name is not same as setTopicName api", topicName, topic.getTopicName());
  }

  /**
   * @since 2016-10-04
   * @see None
   * @objective Test 'getState()' function with positive basic way
   * @target String getState()
   * @test_data None
   * @pre_condition Create instance of Topic with topicName = "TestTopic", TopicState = UNSUBSCRIBED
   * @procedure Perform getState() API
   * @post_condition None
   * @expected Should return same value as constructed method
   */
  public void testGetTopicState_SRC_P() {
    Topic topic = new Topic(TOPIC_NAME, TopicState.UNSUBSCRIBED);

    assertEquals("Topic State is not same in getState() api", TopicState.UNSUBSCRIBED, topic.getState());
  }

  /**
   * @since 2016-10-04
   * @see TopicState getState()
   * @objective Test 'setState()' function with positive basic way
   * @target void setState(TopicState state)
   * @test_data TopicState = UNSUBSCRIBED
   * @pre_condition Create instance of Topic with topicName = "TestTopic", TopicState = UNSUBSCRIBED
   * @procedure 1. Perform setState() API
   *            2. Perform getState() API
   * @post_condition None
   * @expected Should return same value as set value
   */
  public void testSetTopicState_SRC_P() {
    Topic topic = new Topic(TOPIC_NAME, TopicState.UNSUBSCRIBED);
    topic.setState(TopicState.SUBSCRIBED);

    assertEquals("Topic State is not same in setState() api", TopicState.SUBSCRIBED, topic.getState());
  }

  /**
   * @since 2016-10-05
   * @see None
   * @objective Test 'getTopicsList()' function with positive basic way
   * @target Vector<Topic> getTopicsList()
   * @test_data None
   * @pre_condition Create instance of TopicList with topicName = "TestTopic", TopicState = UNSUBSCRIBED
   * @procedure 1. Perform getTopicsList() API
   *            2. Check the size of the list
   * @post_condition None
   * @expected Should be return empty topicList
   */
  public void testGetTopicList_SRC_P() {
    TopicsList topicList = new TopicsList();
    assertEquals("TopicList should be empty", 0, topicList.getTopicsList().size());
  }

  /**
   * @since 2016-10-05
   * @see Vector<Topic> getTopicsList()
   * @objective Test 'addTopic()' function with positive basic way
   * @target void addTopic(String topicname, Topic.TopicState state)
   * @test_data topicName = "TestTopic", TopicState = UNSUBSCRIBED
   * @pre_condition Create instance of TopicList with topicName = "TestTopic", TopicState = UNSUBSCRIBED
   * @procedure 1. Perform addTopic() API
   *            2. Perform getTopicsList() API
   *            3. Check the size of the list
   * @post_condition None
   * @expected Should not return empty topicList
   */
  public void testAddTopic_SRC_P() {
    TopicsList topicList = new TopicsList();

    topicList.addTopic(TOPIC_NAME, TopicState.UNSUBSCRIBED);

    assertNotSame("TopicList should not be empty", 0, topicList.getTopicsList().size());
  }

  /**
   * @since 2016-10-05
   * @see Vector<Topic> getTopicsList()
   * @see void addTopic(String topicname, Topic.TopicState state)
   * @objective Test 'addTopic()' function with positive basic way
   * @target void removeTopic(String topicName)
   * @test_data topicName = "TestTopic", TopicState = UNSUBSCRIBED
   * @pre_condition 1. Create instance of TopicList with topicName = "TestTopic", TopicState = UNSUBSCRIBED
   *                2. Perform addTopic() API
   *                3. Perform addTopic() API
   * @procedure 1. Perform removeTopic() API
   *            2. Check the size of the list
   * @post_condition None
   * @expected Should return topicList with 1 sized
   */
  public void testRemoveTopic_SRC_P() {
    TopicsList topicList = new TopicsList();
    String topicName = "TEST_TOPIC";
    topicList.addTopic(topicName, TopicState.UNSUBSCRIBED);
    topicList.addTopic(TOPIC_NAME, TopicState.UNSUBSCRIBED);

    topicList.removeTopic(topicName);

    assertSame("TopicList should be sized 1", 1, topicList.getTopicsList().size());
  }
}


text:
package akkaviz.server

import akka.http.scaladsl.testkit.ScalatestRouteTest
import org.scalatest.{FunSuite, Matchers}

class FrontendResourcesSupportTest extends FunSuite with ScalatestRouteTest with Matchers {

  val route = FrontendResourcesSupport.frontendResourcesRouting

  test("It is possible to GET index.html") {
    Get() ~> route ~> check {
      handled shouldBe true
    }
  }

  test("It is possible to GET style.css") {
    Get("/css/style.css") ~> route ~> check {
      handled shouldBe true
    }
  }

  test("It is possible to GET frontend-launcher.js") {
    Get("/frontend-launcher.js") ~> route ~> check {
      handled shouldBe true
    }
  }

  test("It is possible to GET frontend-fastopt.js") {
    Get("/frontend-fastopt.js") ~> route ~> check {
      handled shouldBe true
    }
  }

  test("It is possible to GET frontend-fastopt.js.map") {
    Get("/frontend-fastopt.js.map") ~> route ~> check {
      handled shouldBe true
    }
  }

  test("It is possible to GET frontend-jsdeps.js") {
    Get("/frontend-jsdeps.js") ~> route ~> check {
      handled shouldBe true
    }
  }

  test("It is possible to GET something from WebJars") {
    Get("/webjars/vis/4.15.0/dist/vis.min.css") ~> route ~> check {
      handled shouldBe true
    }
  }

}


text:
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class Form9
    Inherits System.Windows.Forms.Form

    'Form remplace la méthode Dispose pour nettoyer la liste des composants.
    <System.Diagnostics.DebuggerNonUserCode()> _
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
        Try
            If disposing AndAlso components IsNot Nothing Then
                components.Dispose()
            End If
        Finally
            MyBase.Dispose(disposing)
        End Try
    End Sub

    'Requise par le Concepteur Windows Form
    Private components As System.ComponentModel.IContainer

    'REMARQUE : la procédure suivante est requise par le Concepteur Windows Form
    'Elle peut être modifiée à l'aide du Concepteur Windows Form.
    'Ne la modifiez pas à l'aide de l'éditeur de code.
    <System.Diagnostics.DebuggerStepThrough()> _
    Private Sub InitializeComponent()
        Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Form9))
        Me.PictureBox32 = New System.Windows.Forms.PictureBox()
        Me.NumericUpDown20 = New System.Windows.Forms.NumericUpDown()
        Me.Label1 = New System.Windows.Forms.Label()
        Me.PictureBox1 = New System.Windows.Forms.PictureBox()
        CType(Me.PictureBox32, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.NumericUpDown20, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.SuspendLayout()
        '
        'PictureBox32
        '
        Me.PictureBox32.BackColor = System.Drawing.Color.Transparent
        Me.PictureBox32.Cursor = System.Windows.Forms.Cursors.Hand
        Me.PictureBox32.Image = Global.Tomodachi_Life_Save_Editor.My.Resources.Resources.exp0
        Me.PictureBox32.Location = New System.Drawing.Point(34, 25)
        Me.PictureBox32.Name = "PictureBox32"
        Me.PictureBox32.Size = New System.Drawing.Size(160, 22)
        Me.PictureBox32.TabIndex = 61
        Me.PictureBox32.TabStop = False
        '
        'NumericUpDown20
        '
        Me.NumericUpDown20.BorderStyle = System.Windows.Forms.BorderStyle.None
        Me.NumericUpDown20.Location = New System.Drawing.Point(94, 58)
        Me.NumericUpDown20.Maximum = New Decimal(New Integer() {99, 0, 0, 0})
        Me.NumericUpDown20.Name = "NumericUpDown20"
        Me.NumericUpDown20.Size = New System.Drawing.Size(40, 16)
        Me.NumericUpDown20.TabIndex = 80
        '
        'Label1
        '
        Me.Label1.AutoSize = True
        Me.Label1.BackColor = System.Drawing.Color.White
        Me.Label1.Cursor = System.Windows.Forms.Cursors.Hand
        Me.Label1.Image = CType(resources.GetObject("Label1.Image"), System.Drawing.Image)
        Me.Label1.Location = New System.Drawing.Point(98, 107)
        Me.Label1.Name = "Label1"
        Me.Label1.Size = New System.Drawing.Size(33, 13)
        Me.Label1.TabIndex = 82
        Me.Label1.Text = "Done"
        '
        'PictureBox1
        '
        Me.PictureBox1.BackColor = System.Drawing.Color.Transparent
        Me.PictureBox1.BackgroundImage = CType(resources.GetObject("PictureBox1.BackgroundImage"), System.Drawing.Image)
        Me.PictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
        Me.PictureBox1.Cursor = System.Windows.Forms.Cursors.Hand
        Me.PictureBox1.Location = New System.Drawing.Point(59, 97)
        Me.PictureBox1.Name = "PictureBox1"
        Me.PictureBox1.Size = New System.Drawing.Size(110, 32)
        Me.PictureBox1.TabIndex = 81
        Me.PictureBox1.TabStop = False
        '
        'Form9
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.BackgroundImage = CType(resources.GetObject("$this.BackgroundImage"), System.Drawing.Image)
        Me.ClientSize = New System.Drawing.Size(229, 151)
        Me.ControlBox = False
        Me.Controls.Add(Me.Label1)
        Me.Controls.Add(Me.PictureBox1)
        Me.Controls.Add(Me.NumericUpDown20)
        Me.Controls.Add(Me.PictureBox32)
        Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
        Me.Name = "Form9"
        Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
        CType(Me.PictureBox32, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.NumericUpDown20, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit()
        Me.ResumeLayout(False)
        Me.PerformLayout()

    End Sub
    Friend WithEvents PictureBox32 As System.Windows.Forms.PictureBox
    Friend WithEvents NumericUpDown20 As System.Windows.Forms.NumericUpDown
    Friend WithEvents Label1 As System.Windows.Forms.Label
    Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox
End Class


text:
package com.aestheticsw.jobkeywords.service.termextractor.domain;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;

import java.util.ArrayList;
import java.util.List;
import java.util.Locale;

import org.junit.Test;

public class TermFrequencyResultsUnitTest {

    @Test
    public void accumulate() {
        QueryKey key = new QueryKey("query", Locale.US, null);
        SearchParameters param1 = new SearchParameters(key, 1, 1, 0, null);
        SearchParameters param2 = new SearchParameters(key, 1, 2, 0, null);
        SearchParameters param3 = new SearchParameters(key, 1, 3, 0, null);

        TermFrequency tf1 = new TermFrequency(new String[] { "java", "3", "1" });
        TermFrequency tf2 = new TermFrequency(new String[] { "spring", "2", "1" });
        TermFrequency tf3 = new TermFrequency(new String[] { "hadoop", "1", "1" });
        List<TermFrequency> list1 = new ArrayList<>();
        list1.add(tf1);
        list1.add(tf2);
        List<TermFrequency> list2 = new ArrayList<>();
        list2.add(tf2);
        list2.add(tf3);

        TermFrequencyResults results = new TermFrequencyResults(param1.getQueryKey());
        results.accumulateTermFrequencyList(param1, list1);
        results.accumulateTermFrequencyList(param2, list1);
        results.accumulateTermFrequencyList(param3, list2);

        List<TermFrequency> sortedList = results.getSortedTermFrequencyList(new TermFrequency.FrequencyComparator());
        assertNotNull(sortedList);
        assertEquals(6, sortedList.get(0).getFrequency());
        assertEquals("java", sortedList.get(0).getTerm());

        assertEquals(6, sortedList.get(1).getFrequency());
        assertEquals("spring", sortedList.get(1).getTerm());

        assertEquals(1, sortedList.get(2).getFrequency());
        assertEquals("hadoop", sortedList.get(2).getTerm());

        // adding param2 a second time should get ignored.
        results.accumulateTermFrequencyList(param2, list2);
        sortedList = results.getSortedTermFrequencyList(new TermFrequency.FrequencyComparator());

        assertEquals(6, sortedList.get(1).getFrequency());
        assertEquals("spring", sortedList.get(1).getTerm());

        assertEquals(1, sortedList.get(2).getFrequency());
        assertEquals("hadoop", sortedList.get(2).getTerm());

    }
}


text:
import { KUBERNETES_V1_CLUSTER_CONFIGURE_COMMANDBUILDER } from './configure/CommandBuilder';
('use strict');

import { module } from 'angular';

export const KUBERNETES_V1_CLUSTER_CLUSTER_KUBERNETES_MODULE = 'spinnaker.cluster.kubernetes';
export const name = KUBERNETES_V1_CLUSTER_CLUSTER_KUBERNETES_MODULE; // for backwards compatibility
module(KUBERNETES_V1_CLUSTER_CLUSTER_KUBERNETES_MODULE, [KUBERNETES_V1_CLUSTER_CONFIGURE_COMMANDBUILDER]);


text:
package org.cucina.i18n.model;

import org.cucina.core.InstanceFactory;
import org.cucina.core.spring.SingletonBeanFactory;
import org.cucina.i18n.repository.MessageRepository;
import org.cucina.i18n.service.I18nService;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.springframework.beans.factory.BeanFactory;

import java.util.Locale;

import static org.junit.Assert.*;
import static org.mockito.Mockito.when;

/**
 * JAVADOC for Class Level
 *
 * @author $Author: $
 * @version $Revision: $
 */
public class MessageTest {
	@Mock
	private BeanFactory bf;
	@Mock
	private I18nService i18nService;
	@Mock
	private InstanceFactory instanceFactory;
	@Mock
	private MessageRepository messageRepository;

	/**
	 * JAVADOC Method Level Comments
	 */
	@Before
	public void setup() {
		MockitoAnnotations.initMocks(this);
		when(i18nService.getLocale()).thenReturn(Locale.ENGLISH);
		when(i18nService.getDefaultLocale()).thenReturn(Locale.JAPANESE);
		when(instanceFactory.getBean(MutableI18nMessage.TYPE)).thenReturn(new MutableI18nMessage());
		when(bf.getBean(I18nService.I18N_SERVICE_ID)).thenReturn(i18nService);
		when(bf.getBean(MessageRepository.MESSAGE_REPOSITORY_ID)).thenReturn(messageRepository);
		when(bf.getBean(SingletonBeanFactory.INSTANCE_FACTORY_ID)).thenReturn(instanceFactory);
		((SingletonBeanFactory) SingletonBeanFactory.getInstance()).setBeanFactory(bf);
	}

	/**
	 * JAVADOC Method Level Comments
	 */
	@Test
	public void testCompareTo() {
		Message message = new Message();

		message.setMessageCd("messageCd");
		message.setMessageTx("messageTx", Locale.ENGLISH.toString());

		Message o = new Message();

		assertFalse(message.compareTo(o) == 0);
	}

	/**
	 * JAVADOC Method Level Comments
	 */
	@Test
	public void testEquals() {
		Message message = new Message();

		message.setMessageCd("messageCd");
		message.setMessageTx("messageTx", Locale.ENGLISH.toString());

		Message o = new Message();

		assertFalse(message.equals(o));
		message.setId(1L);
		o.setId(2L);
		assertFalse(message.equals(o));
		o.setId(1L);
		assertTrue(message.equals(o));
	}

	/**
	 * JAVADOC Method Level Comments
	 */
	@Test
	public void testEqualsMessages() {
		Message message = new Message();

		message.setMessageCd("messageCd");
		message.setMessageTx("messageTx", Locale.ENGLISH.toString());

		Message o = new Message();

		assertFalse(message.equalsMessages(o));
		o.setMessageTx("messageTx", Locale.ENGLISH.toString());
		assertTrue(message.equalsMessages(o));
	}

	/**
	 * JAVADOC Method Level Comments
	 */
	@Test
	public void testRemoveMessage() {
		Message message = new Message();

		assertFalse(message.removeMessage(Locale.CANADA.toString()));
		message.setMessageTx("messageTx", Locale.CANADA.toString());
		assertTrue(message.removeMessage(Locale.CANADA.toString()));
	}

	/**
	 * JAVADOC Method Level Comments
	 */
	@Test
	public void testToString() {
		Message message = new Message();

		message.setMessageCd("messageCd");
		message.setMessageTx("messageTx", Locale.ENGLISH.toString());
		assertEquals("messageTx", message.toString());
	}
}