text:
<!doctype html>

  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>Barricade Style Guide</title>
  <meta name="description" content="Barricade's Language, Style Guide, Tone, Vocal Language, Tone.">
  <meta name="viewport" content="width=device-width">

  <link rel="icon" type="image/png" href="assets/img/favicon-152.png" />
  <link rel="apple-touch-icon-precomposed" href="assets/img/apple-touch-icon-precomposed.png" />

  <link rel="stylesheet" href="assets/css/styleguide.css">

Setup

Getting Started

CSS

Sass

Sass Files

Using Sass

Applications

JavaScript

Global Styles

Kitchen Sink

Accessibility

Upgrading

Structure

Media Queries

Visibility

Grid

Block Grid

Interchange Responsive Content JS

Utility Classes

Javascript Utilities

Right-to-Left Support

Navigation

Off-canvas JS

Top Bar JS

Icon Bar

Side Nav

Magellan Sticky Nav JS

Sub Nav

Breadcrumbs

Pagination

Media

Orbit Slider JS

Thumbnails

Clearing Lightbox JS

Flex Video

Forms

Forms

Switches

Range Sliders JS

Abide Validation JS

Buttons

Buttons

Button Groups

Split Buttons JS

Dropdown Buttons JS

Typography

Type

Inline Lists

Labels

Keystrokes

Callouts & Prompts

Reveal Modal JS

Alerts JS

Panels

Tooltips JS

Joyride JS

Content

Dropdowns JS

Pricing Tables

Progress Bars

Tables

Accordion JS

Tabs JS

Equalizer JS

Support

Changelog

Compatibility

Older Docs

Foundation 4

Foundation 3

Foundation 2

Get a job, nerd!

                Visual Designer
                Kitcheck in Washington DC

                Lead UX Designer
                Hornet in Remote, Anywhere

                Senior Mobile Product Designer
                Schoology in New York, NY

via Job Board from ZURB

Kitchen sink

This page includes every single Foundation element so that we can make sure things work together smoothly.

Joyride

        Start Joyride

Build Joyride with HTML

Stop Number 2 for You!

Stop #1

You can control all the details for your tour stop. Any valid HTML will
            work inside of Joyride.

Stop #2

Get the details right by styling Joyride with a custom stylesheet!

Stop #3

It works as a modal too!

Alert Boxes

          This is a standard alert (div.alert-box.radius).
          ×

          This is a success alert (div.alert-box.success).
          ×

          This is an alert (div.alert-box.alert.round).
          ×

          This is a secondary alert (div.alert-box.secondary).
          ×

Block Grid

Breadcrumbs

Home

Features

Gene Splicing

Cloning

Buttons

            .tiny.button

            .small.button

            .button

            .expand

            .tiny.secondary

            .small.success.radius

            .round.disabled

Button Groups

Button 1

Button 2

Button 3

Button 1

Button 2

Button 3

Button 4

Button 1

Button 2

Button 3

<input type="submit" class="button success" value="Button 1">

<input type="submit" class="button success" value="Button 2">

<input type="submit" class="button success" value="Button 3">

Dropdown Buttons

This is a link

This is another

Yet another link

Tiny Dropdown Button

        Small Secondary Radius Dropdown Button

        Button Alert Round Dropdown Button

        Large Success Dropdown Button

        Large Expanded Dropdown Button

Split Buttons

 Tiny Split Button

         Small Secondary Radius Split Button

         Round Alert Split Button

         Large Success Split Button

Switches

           <input id="a" name="switch-a" type="radio" checked="">
           Off

           <input id="a1" name="switch-a" type="radio">
           On

           <input id="b" name="switch-b" type="radio" checked="">
           Off

           <input id="b1" name="switch-b" type="radio">
           On

           <input id="c" name="switch-c" type="radio" checked="">
           Off

           <input id="c1" name="switch-c" type="radio">
           On

           <input id="d" name="switch-d" type="radio" checked="">
           Off

           <input id="d1" name="switch-d" type="radio">
           On

Clearing

×

Forms

        <form>
          <fieldset>
            <legend>Fieldset</legend>

                Input Label
                <input type="text" placeholder="large-12.columns">

                Input Label
                <input type="text" placeholder="large-4.columns">

                Input Label
                <input type="text" placeholder="large-4.columns">

                  Input Label

                    <input type="text" placeholder="small-9.columns">

                    .com

                Textarea Label
                <textarea placeholder="small-12.columns"></textarea>

          </fieldset>
        </form>

Dropdowns

Link Dropdown »
          Content Dropdown »

This is a link

This is another

Yet another

Title

Some text that people will think is awesome! Some text that people will
            think is awesome! Some text that people will think is awesome!

Launching a Discovery Mission
Button

Flex Video

Inline Lists

Link 1

Link 2

Link 3

Link 4

Link 5

Keystroke

To make something pretty, press and hold cmd + alt + shift + w + a + !

Labels

          Regular Label

          Radius Secondary Label

          Round Alert Label

          Success Label

Magellan

Build with HTML

Using Javascript

Build With Predefined HTML Structure

Nullam quis risus eget urna mollis ornare vel eu leo. Donec ullamcorper nulla non metus auctor fringilla. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Vestibulum id ligula porta felis euismod semper.

Awesome JS Goodness

Nullam quis risus eget urna mollis ornare vel eu leo. Donec ullamcorper nulla non metus auctor fringilla. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Vestibulum id ligula porta felis euismod semper.

Orbit

                  Caption One. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.

                  Caption Two. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.

                  Caption Three. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.

3 of 3

Pagination

«

1

2

3

4

…

12

13

»

Panels

This is a regular panel.

It has an easy to override visual style, and is appropriately subdued.

This is a radius callout panel.

It's a little ostentatious, but useful for important content.

Pricing Tables

Standard

$99.99

An awesome description

1 Database

5GB Storage

20 Users

Buy Now

Progress Bars

Reveal

Example Modal…
        Example Video Modal…

This is a modal.

Reveal makes these very easy to summon and dismiss. The close button is simply an anchor with a unicode character icon and a class of close-reveal-modal. Clicking anywhere outside the modal will also dismiss it.

Finally, if your modal summons another Reveal modal, the plugin will handle that for you gracefully.

Second Modal…

          ×

This is a second modal.

See? It just slides into place after the first modal. Very handy when you need subsequent dialogs, or when a modal option impacts or requires another decision.

          ×

This modal has video

          ×

Sliders

            <input type="hidden" value="50">

            <input type="hidden" value="50">

            <input type="hidden" value="50">

            <input type="hidden" value="40">

Accordion

            Accordion 1

            Accordion 2

Panel 2. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

            Accordion 3

              Panel 3. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Tabs

Tab 1

Tab 2

Tab 3

Tab 4

First panel content goes here...

Second panel content goes here...

Third panel content goes here...

Fourth panel content goes here...

Tab 1

Tab 2

Tab 3

Tab 4

Panel 1 content goes here.

Panel 2 content goes here.

Panel 3 content goes here.

Panel 4 content goes here.

Side Nav

Link 1

Link 2

Link 3

Link 4

Sub Nav

Filter:

All

Active

Pending

Suspended

Tables

              Table Header
              Table Header
              Table Header
              Table Header

              Content Goes Here
              This is longer content Donec id elit non mi porta gravida at eget metus.
              Content Goes Here
              Content Goes Here

              Content Goes Here
              This is longer Content Goes Here Donec id elit non mi porta gravida at eget metus.
              Content Goes Here
              Content Goes Here

              Content Goes Here
              This is longer Content Goes Here Donec id elit non mi porta gravida at eget metus.
              Content Goes Here
              Content Goes Here

Thumbnails

Tooltips

The tooltips can be positioned on the "tip-bottom", which is the default position, "tip-top" (hehe), "tip-left", or "tip-right" of the target element by adding the appropriate class to them. You can even add your own custom class to style each tip differently. On a small device, the tooltips are full width and bottom aligned.

Top Bar

                    Top Bar Title

menu

                  Main Item 1

Back

Main Item 1

Section Name

                      Has Dropdown, Level 1

Back

Has Dropdown, Level 1

Dropdown Options

Dropdown Options

Level 2

Subdropdown Option

Subdropdown Option

Subdropdown Option

Dropdown Option

Dropdown Option

Section Name

Dropdown Option

Dropdown Option

Dropdown Option

See all →

                  Main Item 2

Back

Main Item 2

Dropdown Option

Dropdown Option

Dropdown Option

See all →

Type

h1. This is a very large header.

h2. This is a large header.

h3. This is a medium header.

h4. This is a moderate header.

h5. This is a small header.

h6. This is a tiny header.

h1. subheader

h2. subheader

h3. subheader

h4. subheader

h5. subheader

h6. subheader

Definition List

Definition lists are great for small block of copy that describe the header

Lower cost

The new version of this product costs significantly less than the previous one!

Easier to use

We've changed the product so that it's much easier to use!

Safe for kids

You can leave your kids alone in a room with this product and they won't get hurt (not a guarantee).

Un-ordered lists are great for making quick outlines bulleted.

List item with a much longer description or more content.

List item

List item

Nested List Item

Nested List Item

Nested List Item

List item

List item

List item

Ordered lists are great for lists that need order, duh.

List Item 1

List Item 2

List Item 3

Blockquote

I do not fear computers. I fear the lack of them. Maecenas faucibus mollis interdum. Aenean lacinia bibendum nulla sed consectetur.Isaac Asimov

Vcard

Gaius Baltar

123 Colonial Ave.

Caprica City

Caprica, 12345

g.baltar@example.com

Visibility Classes

Screen Size Visibility Control (Show)

The following text should describe the screen size you're using:

HTML

<p class="panel">
          <strong class="show-for-small-only">This text is shown only on a small screen.</strong>
          <strong class="show-for-medium-up">This text is shown on medium screens and up.</strong>
          <strong class="show-for-medium-only">This text is shown only on a medium screen.</strong>
          <strong class="show-for-large-up">This text is shown on large screens and up.</strong>
          <strong class="show-for-large-only">This text is shown only on a large screen.</strong>
          <strong class="show-for-xlarge-up">This text is shown on xlarge screens and up.</strong>
          <strong class="show-for-xlarge-only">This text is shown only on an xlarge screen.</strong>
          <strong class="show-for-xxlarge-up">This text is shown on xxlarge screens and up.</strong>
        </p>

Rendered HTML

              This text is shown only on a small screen.
              This text is shown on medium screens and up.
              This text is shown only on a medium screen.
              This text is shown on large screens and up.
              This text is shown only on a large screen.
              This text is shown on xlarge screens and up.
              This text is shown only on an xlarge screen.
              This text is shown on xxlarge screens and up.

Screen Size Visibility Control (Hide)

The following text should describe the screen size you aren't using:

HTML

<p class="panel">
          <strong class="hide-for-small-only">You are <em>not</em> on a small screen.</strong>
          <strong class="hide-for-medium-up">You are <em>not</em> on a medium, large, xlarge, or xxlarge screen.</strong>
          <strong class="hide-for-medium-only">You are <em>not</em> on a medium screen.</strong>
          <strong class="hide-for-large-up">You are <em>not</em> on a large, xlarge, or xxlarge screen.</strong>
          <strong class="hide-for-large-only">You are <em>not</em> on a large screen.</strong>
          <strong class="hide-for-xlarge-up">You are <em>not</em> on an xlarge screen and up.</strong>
          <strong class="hide-for-xlarge-only">You are <em>not</em> on an xlarge screen.</strong>
          <strong class="hide-for-xxlarge-up">You are <em>not</em> on an xxlarge screen.</strong>
        </p>

Rendered HTML

              You are not on a small screen.
              You are not on a medium, large, xlarge, or xxlarge screen.
              You are not on a medium screen.
              You are not on a large, xlarge, or xxlarge screen.
              You are not on a large screen.
              You are not on an xlarge screen and up.
              You are not on an xlarge screen.
              You are not on an xxlarge screen.

Orientation Detection

The following text should describe the device orientation you're using:

HTML

<p class="panel">
          <strong class="show-for-landscape">You are in landscape orientation.</strong>
          <strong class="show-for-portrait">You are in portrait orientation.</strong>
        </p>

Rendered HTML

                  You are in landscape orientation.
                  You are in portrait orientation.

Touch Detection

The following text should describe if you're using a touch device:

HTML

<p class="panel">
          <strong class="show-for-touch">You are on a touch-enabled device.</strong>
          <strong class="hide-for-touch">You are not on a touch-enabled device.</strong>
        </p>

Rendered HTML

                  You are on a touch-enabled device.
                  You are not on a touch-enabled device.

Get a running start with Foundation

Learn the fundamentals of the world's most advanced responsive framework in our Intro to Foundation class. You'll learn from the creators themselves on how to use Foundation and jumpstart your next project. Learn more about classes »

              Learn More
              Learn more about classes »

      </script>

<a class="fa fa-rss" href="<?php bloginfo('url'); ?>/feed">


text:
package wang.interfacedemo;

import java.util.ArrayList;
import java.util.Iterator;

import wang.tools.Test_DataManage;
import wang.tools.Test_User;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.widget.Button;
import android.widget.TextView;

public class __CertificateActivity extends Activity{
	Test_DataManage dataManage;
	Test_User u;
	String account;
	String xuehao;
	String school;
	TextView certificateText;
	StringBuffer sb;
	ArrayList<String> arr;
	int flag;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.certificate_details_layout);

        TextView titleView=(TextView) findViewById(R.id.titleTextId);
        TextView button=(TextView) findViewById(R.id.backButtonId);
        titleView.setText("ÒÑ»ñµÃÖ¤Êé");

        dataManage=new Test_DataManage(this);
        account=getIntent().getStringExtra("jay");
        xuehao=getIntent().getStringExtra("xuehao");
        school=getIntent().getStringExtra("school");
        flag=getIntent().getIntExtra("flag", 4);
        if(account!=null)
        	u=dataManage.getStudentByXuehao(dataManage.getUser(account).getSchool(), dataManage.getXuehao(account));
        else if(xuehao!=null&&school!=null)
        	u=dataManage.getStudentByXuehao(school, xuehao);
        sb=new StringBuffer();
        arr=u.getCertificate();
        certificateText=(TextView) findViewById(R.id.certificate_details_2id);
        Iterator<String> it=arr.iterator();
        while(it.hasNext()){
        	sb.append(it.next());
        	sb.append("  ");
        }
        certificateText.setText(sb.toString());
        button.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				finish();
			}
		});
	}
}

redpajama_set_name: RedPajamaGithub


text:
package org.arakhne.afc.references;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Random;
import java.util.Set;

import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;

import org.arakhne.afc.testtools.AbstractTestCase;

/**
 * @param <K>
 * @param <V>
 * @author $Author: sgalland$
 * @version $FullVersion$
 * @mavengroupid $GroupId$
 * @mavenartifactid $ArtifactId$
 */
@SuppressWarnings("all")
public abstract class AbstractMapTestCase<K,V> extends AbstractTestCase {

	/** Random number generator.
	 */
	protected final Random RANDOM = new Random();

	/**
	 */
	protected HashMap<K,V> reference;
	/**
	 */
	protected HashMap<K,V> unreference;
	/**
	 */
	protected Map<K,V> map;

	/**
	 * @throws Exception
	 */
	@Before
	public void setUp() throws Exception {
		int count = this.RANDOM.nextInt(400)+100;
		this.reference = new HashMap<>(count);
		for(int idx=0; idx<count; idx++) {
			this.reference.put(createKeyInstance("in/"), createValueInstance("in/"));  //$NON-NLS-1$ //$NON-NLS-2$
		}

		count = this.RANDOM.nextInt(5)+5;
		this.unreference = new HashMap<>(count);
		for(int idx=0; idx<count; idx++) {
			this.unreference.put(createKeyInstance("out/"), createValueInstance("out/"));  //$NON-NLS-1$ //$NON-NLS-2$
		}

		this.map = createMap();
	}

	/**
	 * @param prefix
	 * @return an instance
	 */
	protected abstract K createKeyInstance(String prefix);

	/**
	 * @param prefix
	 * @return an instance
	 */
	protected abstract V createValueInstance(String prefix);

	/**
	 * @return a map
	 */
	protected abstract Map<K,V> createMap();

	/**
	 * @param toAdd
	 */
	protected void initMapWith(Map<K,V> toAdd) {
		this.map.clear();
		this.map.putAll(toAdd);
	}

	/**
	 * @param toAdd
	 */
	protected void fillMapWith(Map<K,V> toAdd) {
		this.map.putAll(toAdd);
	}

	/**
	 * @throws Exception
	 */
	@After
	public void tearDown() throws Exception {
		this.map = null;
		this.unreference = null;
		this.reference = null;
	}

	/** Replies the key at the given index.
	 *
	 * @param map
	 * @param index
	 * @return the key
	 */
	public static <KK> KK key(Map<KK,?> map, int index) {
		int i = 0;
		for(KK key : map.keySet()) {
			if (i==index) return key;
			++i;
		}
		throw new IndexOutOfBoundsException();
	}

	/** Replies the value at the given index.
	 *
	 * @param map
	 * @param index
	 * @return the vlaue
	 */
	public static <VV> VV value(Map<?,VV> map, int index) {
		int i = 0;
		for(VV value : map.values()) {
			if (i==index) return value;
			++i;
		}
		throw new IndexOutOfBoundsException();
	}

	/**
     */
	@Test
    public void testSize() {
        Assert.assertEquals(0, this.map.size());
        initMapWith(this.reference);
        Assert.assertEquals(this.reference.size(), this.map.size());
    }

    /**
     */
	@Test
    public void testIsEmpty() {
		Assert.assertTrue(this.map.isEmpty());
        initMapWith(this.reference);
        Assert.assertFalse(this.map.isEmpty());
    }

    /**
     */
	@Test
    public void testEntrySet() {
    	Set<Entry<K,V>> entries;

    	entries = this.map.entrySet();
    	Assert.assertTrue(entries.isEmpty());

    	initMapWith(this.reference);

    	entries = this.map.entrySet();
    	Assert.assertFalse(entries.isEmpty());
    	assertEpsilonEquals(this.reference.entrySet(), entries);
    }

    /**
     */
	@Test
    public void testContainsKey() {
    	initMapWith(this.reference);
        int count = this.RANDOM.nextInt(50)+50;
        for(int idx=0; idx<count; idx++) {
        	int index = this.RANDOM.nextInt(this.reference.size());
        	Assert.assertTrue("#"+idx, this.map.containsKey(key(this.reference,index)));  //$NON-NLS-1$
        }
        count = this.RANDOM.nextInt(5)+5;
        int index;
        K elt;
        for(int idx=0; idx<count; idx++) {
        	index = this.RANDOM.nextInt(this.unreference.size());
        	elt = key(this.unreference, index);
        	Assert.assertFalse("#"+idx, this.map.containsKey(elt));  //$NON-NLS-1$
        }
    }

    /**
     */
	@Test
    public void testContainsValue() {
    	initMapWith(this.reference);
        int count = this.RANDOM.nextInt(50)+50;
        for(int idx=0; idx<count; idx++) {
        	int index = this.RANDOM.nextInt(this.reference.size());
        	Assert.assertTrue("#"+idx, this.map.containsValue(value(this.reference,index)));  //$NON-NLS-1$
        }
        count = this.RANDOM.nextInt(5)+5;
        int index;
        V elt;
        for(int idx=0; idx<count; idx++) {
        	index = this.RANDOM.nextInt(this.unreference.size());
        	elt = value(this.unreference, index);
        	Assert.assertFalse("#"+idx, this.map.containsValue(elt));  //$NON-NLS-1$
        }
    }

    /**
     */
	@Test
    public void testGet() {
        int count = this.RANDOM.nextInt(50)+50;
        for(int idx=0; idx<count; idx++) {
        	int index = this.RANDOM.nextInt(this.reference.size());
        	Assert.assertNull("#"+idx, this.map.get(key(this.reference,index)));  //$NON-NLS-1$
        }
        count = this.RANDOM.nextInt(5)+5;
        int index;
        K elt;
        for(int idx=0; idx<count; idx++) {
        	index = this.RANDOM.nextInt(this.unreference.size());
        	elt = key(this.unreference, index);
        	Assert.assertNull("#"+idx, this.map.get(elt));  //$NON-NLS-1$
        }

        initMapWith(this.reference);

        count = this.RANDOM.nextInt(50)+50;
        for(int idx=0; idx<count; idx++) {
        	index = this.RANDOM.nextInt(this.reference.size());
        	elt = key(this.reference, index);
        	Assert.assertEquals("#"+idx, this.reference.get(elt), this.map.get(elt));  //$NON-NLS-1$
        }
        count = this.RANDOM.nextInt(5)+5;
        for(int idx=0; idx<count; idx++) {
        	index = this.RANDOM.nextInt(this.unreference.size());
        	elt = key(this.unreference, index);
        	Assert.assertNull("#"+idx, this.map.get(elt));  //$NON-NLS-1$
        }
    }

    /**
     */
	@Test
    public void testPut() {
        int count = this.RANDOM.nextInt(50)+50;
        for(int idx=0; idx<count; idx++) {
        	K key = createKeyInstance("tmp/");  //$NON-NLS-1$
        	V value = createValueInstance("tmp/");  //$NON-NLS-1$
        	this.map.put(key, value);
        	Assert.assertSame(value, this.map.get(key));
        }
    }

    /**
     */
	@Test
    public void testRemove() {
        initMapWith(this.reference);

        int index, count;
        K elt;

        count = this.RANDOM.nextInt(50)+50;
        for(int idx=0; !this.reference.isEmpty() && idx<count; idx++) {
        	index = this.RANDOM.nextInt(this.reference.size());
        	elt = key(this.reference, index);
        	Assert.assertSame("#"+idx, this.reference.get(elt), this.map.remove(elt));  //$NON-NLS-1$
        	this.reference.remove(elt);
        	Assert.assertNull("#"+idx, this.map.get(elt));  //$NON-NLS-1$
        }
        count = this.RANDOM.nextInt(5)+5;
        for(int idx=0; idx<count; idx++) {
        	index = this.RANDOM.nextInt(this.unreference.size());
        	elt = key(this.unreference, index);
        	Assert.assertNull("#"+idx, this.map.remove(elt));  //$NON-NLS-1$
        }
    }

    /**
     */
	@Test
    public void testPutAll() {
        int index, count;
        K elt;

        this.map.putAll(this.reference);

        count = this.RANDOM.nextInt(50)+50;
        for(int idx=0; idx<count; idx++) {
        	index = this.RANDOM.nextInt(this.reference.size());
        	elt = key(this.reference, index);
        	Assert.assertEquals("#"+idx, this.reference.get(elt), this.map.get(elt));  //$NON-NLS-1$
        }
        count = this.RANDOM.nextInt(5)+5;
        for(int idx=0; idx<count; idx++) {
        	index = this.RANDOM.nextInt(this.unreference.size());
        	elt = key(this.unreference, index);
        	Assert.assertNull("#"+idx, this.map.get(elt));  //$NON-NLS-1$
        }
    }

    /**
     */
	@Test
    public void testClear() {
		Assert.assertEquals(0, this.map.size());
		Assert.assertTrue(this.map.isEmpty());

    	initMapWith(this.reference);
    	Assert.assertEquals(this.reference.size(), this.map.size());
    	Assert.assertFalse(this.map.isEmpty());

    	this.map.clear();

    	Assert.assertEquals(0, this.map.size());
    	Assert.assertTrue(this.map.isEmpty());
    }

    /**
     */
	@Test
    public void testKeySet() {
    	Set<K> keys;

    	keys = this.map.keySet();
    	Assert.assertTrue(keys.isEmpty());

    	initMapWith(this.reference);

    	keys = this.map.keySet();
    	Assert.assertFalse(keys.isEmpty());
    	assertEpsilonEquals(this.reference.keySet(), keys);
    }

    /**
     */
	@Test
    public void testValues() {
    	Collection<V> values;

    	values = this.map.values();
    	Assert.assertTrue(values.isEmpty());

    	initMapWith(this.reference);

    	values = this.map.values();
    	Assert.assertFalse(values.isEmpty());
    	assertEpsilonEquals(this.reference.values(), values);
    }

}


text:
'use strict'

const AJV = require('ajv')
const aws = require('aws-sdk') // eslint-disable-line import/no-unresolved, import/no-extraneous-dependencies

/**
 * Constants
 */
const constants = {
  // self
  MODULE: 'product-photos/6.report/report.js',
  METHOD_: '',
  METHOD_WRITE_TO_STREAM: 'writeToStream',
  METHOD_SUCCEED_ASSIGNMENT: 'succeedAssignment',
  METHOD_DELETE_ASSIGNMENT: 'deleteAssignment',
  // external
  RETAIL_STREAM_NAME: process.env.RETAIL_STREAM_NAME,
  RETAIL_STREAM_WRITER_ARN: process.env.RETAIL_STREAM_WRITER_ARN,
  TABLE_PHOTO_REGISTRATIONS_NAME: process.env.TABLE_PHOTO_REGISTRATIONS_NAME,
  TABLE_PHOTO_ASSIGNMENTS_NAME: process.env.TABLE_PHOTO_ASSIGNMENTS_NAME,
}

/**
 * AJV
 */
// TODO Get these from a better place later
const eventSchema = require('./retail-stream-schema-ingress.json')
const productImageSchema = require('./product-image-schema.json')

// TODO generalize this?  it is used by but not specific to this module
const makeSchemaId = schema => `${schema.self.vendor}/${schema.self.name}/${schema.self.version}`

const eventSchemaId = makeSchemaId(eventSchema)
const productImageSchemaId = makeSchemaId(productImageSchema)

const ajv = new AJV()
ajv.addSchema(eventSchema, eventSchemaId)
ajv.addSchema(productImageSchema, productImageSchemaId)

/**
 * AWS
 */
const dynamo = new aws.DynamoDB.DocumentClient()
const kinesis = new aws.Kinesis()

/**
 * Implementation
 */
const impl = {
  writeToStream: (lambdaEvent, callback) => {
    const origin = `product-photos/Photographer/${lambdaEvent.photographer.phone}/${lambdaEvent.photographer.name}`
    const productId = lambdaEvent.data.id.toString()
    const imageEvent = {
      schema: eventSchemaId,
      origin,
      timeOrigin: new Date().toISOString(),
      data: {
        schema: productImageSchemaId,
        id: productId,
        image: lambdaEvent.image,
      },
    }
    if (!ajv.validate(eventSchemaId, imageEvent)) {
      callback(`failure to validate to '${eventSchemaId}' with event:\n${imageEvent}`)
    } else if (!ajv.validate(productImageSchemaId, imageEvent.data)) {
      callback(`failure to validate to '${productImageSchemaId}' with event data:\n${imageEvent.data}`)
    } else {
      const params = {
        Data: JSON.stringify(imageEvent),
        PartitionKey: productId,
        StreamName: constants.RETAIL_STREAM_NAME,
      }
      kinesis.putRecord(params, callback)
    }
  },
  succeedAssignment: (event, callback) => {
    const updated = Date.now()
    const params = {
      TableName: constants.TABLE_PHOTO_REGISTRATIONS_NAME,
      Key: {
        id: event.photographer.id,
      },
      ConditionExpression: '#aa=:aa',
      UpdateExpression: [
        'set',
        '#u=:u,',
        '#ub=:ub,',
        '#as=#as+:as',
        'remove',
        '#aa',
      ].join(' '),
      ExpressionAttributeNames: {
        '#u': 'updated',
        '#ub': 'updatedBy',
        '#as': 'assignments',
        '#aa': 'assignment',
      },
      ExpressionAttributeValues: {
        ':u': updated,
        ':ub': event.origin,
        ':as': 1,
        ':aa': event.data.id.toString(),
      },
      ReturnValues: 'NONE',
      ReturnConsumedCapacity: 'NONE',
      ReturnItemCollectionMetrics: 'NONE',
    }
    dynamo.update(params, callback)
  },
  deleteAssignment: (event, callback) => {
    const params = {
      TableName: constants.TABLE_PHOTO_ASSIGNMENTS_NAME,
      Key: {
        number: event.photographer.phone,
      },
      ConditionExpression: 'attribute_exists(#nu)',
      ExpressionAttributeNames: {
        '#nu': 'number', // status
      },
    }
    dynamo.delete(params, (err) => {
      if (err) {
        if (err.code && err.code === 'ConditionalCheckFailedException') { // consider the deletion of the record to indicate preemption by another component
          callback()
        } else {
          callback(err)
        }
      } else {
        callback()
      }
    })
  },
}

module.exports = {
  /**
   * Handle the report stage of the Acquire Photo Step Function
   *    1. Report the photo to the stream
   *    2. Delete the pending assignment
   * Example Event:
   * {
   *   schema: 'com.nordstrom/retail-stream/1-0-0',
   *   origin: 'hello-retail/product-producer-automation',
   *   timeOrigin: '2017-01-12T18:29:25.171Z',
   *   data: {
   *     schema: 'com.nordstrom/product/create/1-0-0',
   *     id: 4579874,
   *     brand: 'POLO RALPH LAUREN',
   *     name: 'Polo Ralph Lauren 3-Pack Socks',
   *     description: 'PAGE:/s/polo-ralph-lauren-3-pack-socks/4579874',
   *     category: 'Socks for Men',
   *   },
   *   photographers: ['Erik'],
   *   photographer: {
   *     name: 'Erik',
   *     phone: '+<num>',
   *   },
   *   image: 'erik.hello-retail.biz/i/p/4579874'
   * }
   */
  handler: (event, context, callback) => {
    console.log(JSON.stringify(event))

    impl.writeToStream(event, (wErr) => {
      if (wErr) {
        callback(`${constants.MODULE} ${constants.METHOD_WRITE_TO_STREAM} - ${wErr.stack}`)
      } else {
        impl.succeedAssignment(event, (sErr) => {
          if (sErr && !(sErr.code && sErr.code === 'ConditionalCheckFailedException')) { // if we fail due to the conditional check, we should proceed regardless to remain idempotent
            callback(`${constants.MODULE} ${constants.METHOD_SUCCEED_ASSIGNMENT} - ${sErr.stack}`)
          } else {
            impl.deleteAssignment(event, (dErr) => {
              if (dErr) {
                callback(`${constants.MODULE} ${constants.METHOD_DELETE_ASSIGNMENT} - ${dErr.stack}`)
              } else {
                const result = event
                result.outcome = 'photo taken'
                callback(null, result)
              }
            })
          }
        })
      }
    })
  },
}