diff --git a/tests/connect_test.go b/tests/connect_test.go
deleted file mode 100644
index 05310b7..0000000
--- a/tests/connect_test.go
+++ /dev/null
@@ -1,107 +0,0 @@
-// Copyright 2015 Shiguredo Inc. <fuji@shiguredo.jp>
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//    http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package main
-
-import (
-	"fmt"
-	"testing"
-	"time"
-
-	MQTT "git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git"
-	"github.com/stretchr/testify/assert"
-
-	"github.com/shiguredo/fuji"
-	"github.com/shiguredo/fuji/broker"
-	"github.com/shiguredo/fuji/device"
-	"github.com/shiguredo/fuji/gateway"
-	"github.com/shiguredo/fuji/inidef"
-)
-
-// publish test to broker on localhost
-// dummydevice is used as a source of published message
-func TestConnectLocalPub(t *testing.T) {
-
-	go fuji.Start("connectlocalpub.ini")
-
-	time.Sleep(2 * time.Second)
-}
-
-// TestConnectLocalPubSub tests
-// 1. connect gateway to local broker
-// 2. send data from dummy
-// 3. check subscribe
-func TestConnectLocalPubSub(t *testing.T) {
-	assert := assert.New(t)
-
-	// pub/sub test to broker on localhost
-	// dummydevice is used as a source of published message
-	// publised messages confirmed by subscriber
-
-	// get config
-	conf, err := inidef.LoadConfig("connectlocalpubsub.ini")
-	assert.Nil(err)
-
-	// get Gateway
-	gw, err := gateway.NewGateway(conf)
-	assert.Nil(err)
-
-	// get Broker
-	brokerList, err := broker.NewBrokers(conf, gw.BrokerChan)
-	assert.Nil(err)
-
-	// get DummyDevice
-	dummyDevice, err := device.NewDummyDevice(conf.Sections[3], brokerList, device.NewDeviceChannel())
-	assert.Nil(err)
-	assert.NotNil(dummyDevice)
-
-	// Setup MQTT pub/sub client to confirm published content.
-	//
-	subscriberChannel := make(chan [2]string)
-
-	opts := MQTT.NewClientOptions()
-	url := fmt.Sprintf("tcp://%s:%d", brokerList[0].Host, brokerList[0].Port)
-	opts.AddBroker(url)
-	opts.SetClientID(gw.Name)
-	opts.SetCleanSession(false)
-	opts.SetDefaultPublishHandler(func(client *MQTT.Client, msg MQTT.Message) {
-		subscriberChannel <- [2]string{msg.Topic(), string(msg.Payload())}
-	})
-
-	client := MQTT.NewClient(opts)
-	assert.Nil(err)
-	if token := client.Connect(); token.Wait() && token.Error() != nil {
-		assert.Nil(token.Error())
-	}
-
-	qos := 0
-	topic := "#"
-	client.Subscribe(topic, byte(qos), func(client *MQTT.Client, msg MQTT.Message) {
-	})
-
-	// TODO: should be write later
-	/*
-		channel := fuji.SetupMQTTChannel(client, gateway, brokerList[0])
-
-		// Setup DummyDevice to publish test payload
-
-		dummyDevice.Start(channel)
-
-		// wait for 1 publication of dummy worker
-		message := <-subscriberChannel
-		assert.Equal("dummy", message)
-
-		client.Disconnect(250)
-	*/
-}
diff --git a/tests/connectlocalpub.ini b/tests/connectlocalpub.ini
deleted file mode 100644
index c11bae7..0000000
--- a/tests/connectlocalpub.ini
+++ /dev/null
@@ -1,21 +0,0 @@
-[gateway]
-
-    name = ham
-
-[broker "mosquitto/1"]
-
-    host = localhost
-    port = 1883
-
-    retry_interval = 10
-
-
-[device "dora/dummy"]
-
-    broker = mosquitto
-    qos = 0
-
-    interval = 10
-    payload = connect local pub only Hello world.
-
-    type = EnOcean
diff --git a/tests/connectlocalpubsub.ini b/tests/connectlocalpubsub.ini
deleted file mode 100644
index acb61f6..0000000
--- a/tests/connectlocalpubsub.ini
+++ /dev/null
@@ -1,36 +0,0 @@
-; Copyright 2015 Shiguredo Inc. <fuji@shiguredo.jp>
-;
-; Licensed under the Apache License, Version 2.0 (the "License");
-; you may not use this file except in compliance with the License.
-; You may obtain a copy of the License at
-;
-;    http://www.apache.org/licenses/LICENSE-2.0
-;
-; Unless required by applicable law or agreed to in writing, software
-; distributed under the License is distributed on an "AS IS" BASIS,
-; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-; See the License for the specific language governing permissions and
-; limitations under the License.
-
-
-[gateway]
-
-    name = ham
-
-[broker "mosquitto/1"]
-
-    host = localhost
-    port = 1883
-
-    retry_interval = 10
-
-
-[device "dora/dummy"]
-
-    broker = mosquitto
-    qos = 0
-
-    interval = 10
-    payload = connect local pubsub Hello world.
-
-    type = EnOcean
diff --git a/tests/ini_retain_test.go b/tests/ini_retain_test.go
deleted file mode 100644
index 532c071..0000000
--- a/tests/ini_retain_test.go
+++ /dev/null
@@ -1,186 +0,0 @@
-// Copyright 2015 Shiguredo Inc. <fuji@shiguredo.jp>
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//    http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package main
-
-import (
-	"testing"
-
-	"github.com/stretchr/testify/assert"
-
-	"github.com/shiguredo/fuji/broker"
-	"github.com/shiguredo/fuji/device"
-	"github.com/shiguredo/fuji/inidef"
-	"github.com/shiguredo/fuji/message"
-)
-
-// iniRetainTestCase はRetain機能のテストの条件を示すデータ型です。
-// iniString は設定ファイルの内容
-// expectedError はテストを実行したときに期待されるエラーの状態
-// message はテストが失敗した内容の説明
-type iniRetainTestCase struct {
-	iniStr        string
-	expectedError inidef.AnyError
-	message       string
-}
-
-var serialDeviceTestcases = []iniRetainTestCase{
-	// check device validation without retain flag
-	{
-		iniStr: `
-		[broker "sango/1"]
-		host = localhost
-		port = 1883
-
-		[device "hi/serial"]
-		broker = sango
-		serial = /dev/tty
-		baud = 9600
-		qos = 0
-`,
-		expectedError: nil,
-		message:       "Retain flag could not be omitted. Shall be optional."},
-	// check device validation with retain flag
-	{
-		iniStr: `
-		[broker "sango/1"]
-		host = localhost
-		port = 1883
-
-		[device "hi/serial"]
-		broker = sango
-		serial = /dev/tty
-		baud = 9600
-		qos = 0
-		retain = true
-		qos = 0
-`,
-		expectedError: nil,
-		message:       "Retain flag could not be set."},
-	// check device validation with retain flag is false
-	{
-		iniStr: `
-		[broker "sango/1"]
-		host = localhost
-		port = 1883
-
-		[device "hi/serial"]
-		broker = sango
-		serial = /dev/tty
-		baud = 9600
-		qos = 0
-		retain = false 
-		qos = 0
-`,
-		expectedError: nil,
-		message:       "Retain flag could not be un-set."},
-}
-
-var dummyDeviceTestcases = []iniRetainTestCase{
-	// check device validation without retain flag
-	{
-		iniStr: `
-		[broker "sango/1"]
-		host = localhost
-		port = 1883
-
-		[device "hi/dummy"]
-		broker = sango
-		qos = 0
-		interval = 10
-		payload = Hello world.
-`,
-		expectedError: nil,
-		message:       "Retain flag could not be omitted. Shall be optional."},
-	// check device validation with retain flag
-	{
-		iniStr: `
-		[broker "sango/1"]
-		host = localhost
-		port = 1883
-
-		[device "hi/dummy"]
-		broker = sango
-		qos = 0
-		retain = true
-		interval = 10
-		payload = Hello world.
-`,
-		expectedError: nil,
-		message:       "Retain flag could not be set."},
-	// check device validation with retain flag is false
-	{
-		iniStr: `
-		[broker "sango/1"]
-		host = localhost
-		port = 1883
-
-        [device "hi/dummy"]
-		broker = sango
-		qos = 0
-		retain = false 
-		interval = 10
-		payload = Hello world.
-`,
-		expectedError: nil,
-		message:       "Retain flag could not be un-set."},
-}
-
-// generalIniRetainSerialDeviceTest checks retain function with serial device
-func generalIniRetainSerialDeviceTest(test iniRetainTestCase, t *testing.T) {
-	assert := assert.New(t)
-
-	conf, err := inidef.LoadConfigByte([]byte(test.iniStr))
-	assert.Nil(err)
-
-	brokers, err := broker.NewBrokers(conf, make(chan message.Message))
-	assert.Nil(err)
-
-	devices, _, err := device.NewDevices(conf, brokers)
-	assert.Nil(err)
-	assert.Equal(1, len(devices))
-}
-
-// generalIniRetainDummyDeviceTest checks retain function with dummy device
-func generalIniRetainDummyDeviceTest(test iniRetainTestCase, t *testing.T) {
-	assert := assert.New(t)
-
-	conf, err := inidef.LoadConfigByte([]byte(test.iniStr))
-	assert.Nil(err)
-
-	brokers, err := broker.NewBrokers(conf, make(chan message.Message))
-	assert.Nil(err)
-
-	dummy, err := device.NewDummyDevice(conf.Sections[2], brokers, device.NewDeviceChannel())
-	if test.expectedError == nil {
-		assert.Nil(err)
-		assert.NotNil(dummy)
-	} else {
-		assert.NotNil(err)
-	}
-}
-
-// TestIniRetainDeviceAll tests a serial device using test code
-func TestIniRetainDeviceAll(t *testing.T) {
-	for _, testcase := range serialDeviceTestcases {
-		generalIniRetainSerialDeviceTest(testcase, t)
-	}
-}
-
-// TestIniRetainDeviceAll tests a dummy device using test code
-func TestIniRetainDummyDeviceAll(t *testing.T) {
-	for _, testcase := range dummyDeviceTestcases {
-		generalIniRetainDummyDeviceTest(testcase, t)
-	}
-}
diff --git a/tests/ini_test.go b/tests/ini_test.go
deleted file mode 100644
index 62fd356..0000000
--- a/tests/ini_test.go
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright 2015 Shiguredo Inc. <fuji@shiguredo.jp>
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//    http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package main
-
-import (
-	"testing"
-
-	"github.com/stretchr/testify/assert"
-
-	"github.com/shiguredo/fuji/broker"
-	"github.com/shiguredo/fuji/device"
-	"github.com/shiguredo/fuji/gateway"
-	"github.com/shiguredo/fuji/inidef"
-	"github.com/shiguredo/fuji/message"
-)
-
-func TestIniLoadini(t *testing.T) {
-	assert := assert.New(t)
-
-	_, err := inidef.LoadConfig("testing_conf.ini")
-	assert.Nil(err)
-}
-
-func TestIniNewGateway(t *testing.T) {
-	assert := assert.New(t)
-
-	conf, err := inidef.LoadConfig("testing_conf.ini")
-	assert.Nil(err)
-	gw, err := gateway.NewGateway(conf)
-	assert.Nil(err)
-	assert.Equal("ham", gw.Name)
-}
-
-func TestIniNewBrokers(t *testing.T) {
-	assert := assert.New(t)
-
-	conf, err := inidef.LoadConfig("testing_conf.ini")
-	assert.Nil(err)
-	brokerList, err := broker.NewBrokers(conf, make(chan message.Message))
-	assert.Nil(err)
-	assert.Equal(3, len(brokerList))
-}
-
-func TestIniNewSerialDevices(t *testing.T) {
-	assert := assert.New(t)
-
-	conf, err := inidef.LoadConfig("testing_conf.ini")
-	brokerList, err := broker.NewBrokers(conf, make(chan message.Message))
-	assert.Nil(err)
-	deviceList, _, err := device.NewDevices(conf, brokerList)
-	assert.Nil(err)
-	assert.Equal(3, len(deviceList))
-}
-
-func TestIniNewDummyDevice(t *testing.T) {
-	assert := assert.New(t)
-
-	conf, err := inidef.LoadConfig("testing_conf.ini")
-	brokerList, err := broker.NewBrokers(conf, make(chan message.Message))
-	assert.Nil(err)
-
-	dummy, err := device.NewDummyDevice(conf.Sections[7], brokerList, device.NewDeviceChannel())
-	assert.Nil(err)
-	assert.Equal("dummy", dummy.DeviceType())
-	assert.Equal(2, int(dummy.QoS))
-}
diff --git a/tests/ini_will_test.go b/tests/ini_will_test.go
deleted file mode 100644
index 0687fc5..0000000
--- a/tests/ini_will_test.go
+++ /dev/null
@@ -1,116 +0,0 @@
-// Copyright 2015 Shiguredo Inc. <fuji@shiguredo.jp>
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//    http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package main
-
-import (
-	"testing"
-
-	"github.com/stretchr/testify/assert"
-
-	"github.com/shiguredo/fuji/broker"
-	"github.com/shiguredo/fuji/inidef"
-	"github.com/shiguredo/fuji/message"
-)
-
-type iniWillTestCase struct {
-	iniStr        string          // testcase config file
-	expectedError inidef.AnyError // expected error status
-	message       string          // message when failed
-}
-
-var testcases = []iniWillTestCase{
-	// tests broker validation without will_message
-	{
-		iniStr: `
-                [broker "sango/1"]
-
-                    host = localhost
-                    port = 1883
-`,
-		expectedError: nil,
-		message:       "WillMessage could not be omitted. Shall be optional."},
-	// tests broker validation with will_message
-	{
-		iniStr: `
-                [broker "sango/1"]
-
-                    host = localhost
-                    port = 1883
-		    will_message = Hello world.
-`,
-		expectedError: nil,
-		message:       "WillMessage could not be defined."},
-	// tests broker validation with empty will_message
-	{
-		iniStr: `
-                [broker "sango/1"]
-
-                    host = localhost
-                    port = 1883
-		    will_message = ""
-`,
-		expectedError: nil,
-		message:       "Empty WillMessage could not be defined."},
-	// tests multiple broker validation with only one will_message
-	{
-		iniStr: `
-                [broker "sango/1"]
-
-                    host = localhost
-                    port = 1883
-
-                [broker "sango/2"]
-
-                    host = 192.168.1.1 
-                    port = 1883
-		    will_message = Hello world.
-`,
-		expectedError: nil,
-		message:       "WillMessage could not be defined for one of two."},
-	// tests multiple broker validation with both will_message
-	{
-		iniStr: `
-                [broker "sango/1"]
-
-                    host = localhost
-                    port = 1883
-		    will_message = Change the world.
-
-                [broker "sango/2"]
-
-                    host = 192.168.1.1 
-                    port = 1883
-		    will_message = Hello world.
-`,
-		expectedError: nil,
-		message:       "WillMessage could not be defined for both of two."},
-}
-
-func generalIniWillTest(test iniWillTestCase, t *testing.T) {
-	assert := assert.New(t)
-
-	conf, err := inidef.LoadConfigByte([]byte(test.iniStr))
-	assert.Nil(err)
-
-	brokers, err := broker.NewBrokers(conf, make(chan message.Message))
-	assert.Nil(err)
-	assert.NotEqual(0, len(brokers))
-}
-
-func TestIniWillAll(t *testing.T) {
-	for _, testcase := range testcases {
-		generalIniWillTest(testcase, t)
-	}
-}
diff --git a/tests/retain_test.go b/tests/retain_test.go
deleted file mode 100644
index b557a1c..0000000
--- a/tests/retain_test.go
+++ /dev/null
@@ -1,172 +0,0 @@
-// Copyright 2015 Shiguredo Inc. <fuji@shiguredo.jp>
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//    http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package main
-
-import (
-	"fmt"
-	"testing"
-	"time"
-
-	MQTT "git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git"
-	"github.com/stretchr/testify/assert"
-
-	"github.com/shiguredo/fuji"
-	"github.com/shiguredo/fuji/broker"
-	"github.com/shiguredo/fuji/device"
-	"github.com/shiguredo/fuji/gateway"
-	"github.com/shiguredo/fuji/inidef"
-)
-
-// TestRetainJustPublish tests
-// 1. connect gateway to local broker
-// 2. send data with retaind flag dummy device normaly
-func TestRetainJustPublish(t *testing.T) {
-	assert := assert.New(t)
-	iniStr := `
-	[gateway]
-	
-	    name = retainham
-	
-	[broker "local/1"]
-	
-	    host = localhost
-	    port = 1883
-	
-	[device "doraretain/dummy"]
-	
-	    broker = local
-	    qos = 0
-	
-	    interval = 10
-	    payload = Hello world retain true.
-	
-	    type = EnOcean
-	    retain = true
-`
-	conf, err := inidef.LoadConfigByte([]byte(iniStr))
-	assert.Nil(err)
-	commandChannel := make(chan string)
-	go fuji.StartByFileWithChannel(conf, commandChannel)
-
-	time.Sleep(2 * time.Second)
-}
-
-// TestRetainSubscribePublishClose
-// 1. connect gateway to local broker
-// 2. send data with retaind flag from dummy device
-// 3. disconnect
-// 4. reconnect
-// 5. subscirbe and receive data
-func TestRetainSubscribePublishClose(t *testing.T) {
-	assert := assert.New(t)
-	iniStr := `
-	[gateway]
-	
-	    name = testRetainafterclose
-	
-	[broker "local/1"]
-	
-	    host = localhost
-	    port = 1883
-	
-	[device "dora/dummy"]
-	
-	    broker = local
-	    qos = 0
-	
-	    interval = 10
-	    payload = Hello retained world to subscriber after close.
-	
-	    type = EnOcean
-	    retain = true
-`
-	commandChannel := make(chan string)
-	conf, err := inidef.LoadConfigByte([]byte(iniStr))
-	assert.Nil(err)
-	go fuji.StartByFileWithChannel(conf, commandChannel)
-
-	gw, err := gateway.NewGateway(conf)
-	if err != nil {
-		t.Error("Cannot make Gateway")
-	}
-
-	brokerList, err := broker.NewBrokers(conf, gw.BrokerChan)
-	if err != nil {
-		t.Error("Cannot make BrokerList")
-	}
-
-	devChan := device.NewDeviceChannel()
-	gw.DeviceChannels = append(gw.DeviceChannels, devChan)
-	dummyDevice, err := device.NewDummyDevice(conf.Sections[3], brokerList, devChan)
-	if err != nil {
-		t.Error("Cannot make DummyDeviceList")
-	}
-
-	go func() {
-		time.Sleep(2 * time.Second)
-
-		// kill publisher
-		gw.Stop()
-
-		time.Sleep(2 * time.Second)
-
-		subscriberChannel, err := setupRetainSubscriber(gw, brokerList[0], &dummyDevice)
-		if err != inidef.Error("") {
-			t.Error(err)
-		}
-		// check Retained message
-		retainedMessage := <-subscriberChannel
-		retainedTopic := retainedMessage[0]
-		retainedPayload := retainedMessage[1]
-
-		expectedTopic := fmt.Sprintf("%s/%s/%s/%s", brokerList[0].TopicPrefix, gw.Name, dummyDevice.Name, dummyDevice.Type)
-		expectedPayload := dummyDevice.Payload
-
-		assert.Equal(expectedTopic, retainedTopic)
-		assert.Equal(expectedPayload, retainedPayload)
-	}()
-	time.Sleep(5 * time.Second)
-}
-
-// setupRetainSubscriber returnes channel in order to read messages with retained flag
-func setupRetainSubscriber(gw *gateway.Gateway, broker *broker.Broker, dummyDevice *device.DummyDevice) (chan [2]string, inidef.Error) {
-	// Setup MQTT pub/sub client to confirm published content.
-	//
-	messageOutputChannel := make(chan [2]string)
-
-	opts := MQTT.NewClientOptions()
-	brokerUrl := fmt.Sprintf("tcp://%s:%d", broker.Host, broker.Port)
-	opts.AddBroker(brokerUrl)
-	opts.SetClientID(gw.Name + "testSubscriber") // to distinguish MQTT client from publisher
-	opts.SetCleanSession(false)
-	opts.SetDefaultPublishHandler(func(client *MQTT.Client, msg MQTT.Message) {
-		messageOutputChannel <- [2]string{msg.Topic(), string(msg.Payload())}
-	})
-
-	client := MQTT.NewClient(opts)
-	if client == nil {
-		return nil, inidef.Error("NewClient failed")
-	}
-
-	if token := client.Connect(); token.Wait() && token.Error() != nil {
-		return nil, inidef.Error(fmt.Sprintf("NewClient Start failed %q", token.Error()))
-	}
-	qos := 0
-	retainedTopic := fmt.Sprintf("%s/%s/%s/%s", broker.TopicPrefix, gw.Name, dummyDevice.Name, dummyDevice.Type)
-	client.Subscribe(retainedTopic, byte(qos), func(client *MQTT.Client, msg MQTT.Message) {
-	})
-
-	return messageOutputChannel, inidef.Error("")
-}
diff --git a/tests/testing_conf.ini b/tests/testing_conf.ini
deleted file mode 100644
index bde5611..0000000
--- a/tests/testing_conf.ini
+++ /dev/null
@@ -1,65 +0,0 @@
-[gateway]
-
-    name = ham
-
-[broker "sango/1"]
-
-    host = 192.0.2.10
-    port = 1883
-
-    username = fuji-gw
-    password = 123
-
-    topic_prefix = fuji-gw@example.com
-    retry_interval = 10
-
-
-[broker "sango/2"]
-
-    host = 192.0.2.11
-    port = 1883
-
-    username = fuji-gw
-    password = 123
-
-    topic_prefix = fuji-gw@example.com
-    retry_interval = 10
-
-[broker "akane"]
-
-    host = 192.0.2.20
-    port = 8883
-    tls = true
-    cert = /path/to/cert
-
-    username = fuji-gw
-    password = 456
-
-[device "spam/serial"]
-
-    broker = sango
-    qos = 0
-
-    serial = /dev/tty.ble
-    baud = 9600
-    size = 4
-    type = BLE
-
-[device "beacon/serial"]
-
-    broker = sango
-    qos = 2
-
-    serial = /dev/tty.enocean
-    baud = 115200
-    size = 8
-    type = EnOcean
-
-[device "dora/dummy"]
-
-    broker = sango
-    qos = 2
-
-    interval = 10
-    payload = Hello world.
-    type = BLE
diff --git a/tests/will_test.go b/tests/will_test.go
deleted file mode 100644
index 05651e6..0000000
--- a/tests/will_test.go
+++ /dev/null
@@ -1,212 +0,0 @@
-// Copyright 2015 Shiguredo Inc. <fuji@shiguredo.jp>
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//    http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package main
-
-import (
-	"fmt"
-	"testing"
-	"time"
-
-	MQTT "git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git"
-	"github.com/stretchr/testify/assert"
-
-	"github.com/shiguredo/fuji"
-	"github.com/shiguredo/fuji/broker"
-	"github.com/shiguredo/fuji/gateway"
-	"github.com/shiguredo/fuji/inidef"
-)
-
-// TestWillJustPublish tests
-// 1. connect localhost broker with will message
-// 2. send data from a dummy device
-// 3. disconnect
-func TestWillJustPublish(t *testing.T) {
-	assert := assert.New(t)
-
-	iniStr := `
-	[gateway]
-	    name = willjustpublishham
-	[broker "local/1"]
-	    host = localhost
-	    port = 1883
-	    will_message = no letter is good letter.
-	[device "dora/dummy"]
-	    broker = local
-	    qos = 0
-	    interval = 10
-	    payload = Hello will just publish world.
-	    type = EnOcean
-`
-	conf, err := inidef.LoadConfigByte([]byte(iniStr))
-	assert.Nil(err)
-	commandChannel := make(chan string)
-	go fuji.StartByFileWithChannel(conf, commandChannel)
-	time.Sleep(5 * time.Second)
-
-	//	fuji.Stop()
-}
-
-// TestWillSubscribePublishClose
-// 1. connect subscriber and publisher to localhost broker with will message
-// 2. send data from a dummy device
-// 3. force disconnect
-// 4. check subscriber receives will message
-func TestWillSubscribePublishClose(t *testing.T) {
-	assert := assert.New(t)
-
-	iniStr := `
-	[gateway]
-	    name = testwillafterclose
-	[broker "local/1"]
-	    host = localhost
-	    port = 1883
-	    will_message = good letter is no letter.
-	[device "dora/dummy"]
-	    broker = local
-	    qos = 0
-	    interval = 10
-	    payload = Hello will just publish world.
-	    type = EnOcean
-`
-	ok := genericWillTestDriver(t, iniStr, "/testwillafterclose/will", []byte("good letter is no letter."))
-	assert.True(ok, "Failed to receive Will message")
-}
-
-// TestWillSubscribePublishCloseEmpty
-// 1. connect subscriber and publisher to localhost broker with will message
-// 2. send data from a dummy device
-// 3. force disconnect
-// 4. check subscriber receives will message
-func TestWillSubscribePublishCloseEmpty(t *testing.T) {
-	iniStr := `
-	[gateway]
-	    name = testwillaftercloseemptywill
-	[broker "local/1"]
-	    host = localhost
-	    port = 1883
-	    will_message = 
-	[device "dora/dummy"]
-	    broker = local
-	    qos = 0
-	    interval = 10
-	    payload = Hello will just publish world.
-	    type = EnOcean
-`
-	ok := genericWillTestDriver(t, iniStr, "/testwillaftercloseemptywill/will", []byte{})
-	if !ok {
-		t.Error("Failed to receive Empty Will message")
-	}
-}
-
-func TestWillSubscribePublishBinaryWill(t *testing.T) {
-	iniStr := `
-	[gateway]
-	    name = binary
-	[broker "local/1"]
-	    host = localhost
-	    port = 1883
-	    will_message = \x01\x02
-	[device "dora/dummy"]
-	    broker = local
-	    qos = 0
-	    interval = 10
-	    payload = Hello will just publish world.
-	    type = EnOcean
-`
-	ok := genericWillTestDriver(t, iniStr, "/binary/will", []byte{1, 2})
-	if !ok {
-		t.Error("Failed to receive Empty Will message")
-	}
-}
-
-// genericWillTestDriver
-// 1. read config string
-// 2. connect subscriber and publisher to localhost broker with will message
-// 3. send data from a dummy device
-// 4. force disconnect
-// 5. check subscriber receives will message
-
-func genericWillTestDriver(t *testing.T, iniStr string, expectedTopic string, expectedPayload []byte) (ok bool) {
-	assert := assert.New(t)
-
-	conf, err := inidef.LoadConfigByte([]byte(iniStr))
-	assert.Nil(err)
-	commandChannel := make(chan string)
-	go fuji.StartByFileWithChannel(conf, commandChannel)
-
-	gw, err := gateway.NewGateway(conf)
-	assert.Nil(err)
-
-	brokers, err := broker.NewBrokers(conf, gw.BrokerChan)
-	assert.Nil(err)
-
-	go func() {
-		time.Sleep(1 * time.Second)
-
-		subscriberChannel, err := setupWillSubscriber(gw, brokers[0])
-		if err != inidef.Error("") {
-			t.Error(err)
-		}
-
-		time.Sleep(1 * time.Second)
-
-		// kill publisher
-		brokers[0].FourceClose()
-		fmt.Println("broker killed for getting will message")
-
-		// check will message
-		willMsg := <-subscriberChannel
-
-		assert.Equal(expectedTopic, willMsg.Topic())
-		assert.Equal(expectedPayload, willMsg.Payload())
-		assert.Equal(byte(0), willMsg.Qos())
-	}()
-	time.Sleep(3 * time.Second)
-	ok = true
-	return ok
-}
-
-// setupWillSubscriber start subscriber process and returnes a channel witch can receive will message.
-func setupWillSubscriber(gw *gateway.Gateway, broker *broker.Broker) (chan MQTT.Message, inidef.Error) {
-	// Setup MQTT pub/sub client to confirm published content.
-	//
-	messageOutputChannel := make(chan MQTT.Message)
-
-	opts := MQTT.NewClientOptions()
-	brokerUrl := fmt.Sprintf("tcp://%s:%d", broker.Host, broker.Port)
-	opts.AddBroker(brokerUrl)
-	opts.SetClientID(gw.Name + "testSubscriber") // to distinguish MQTT client from publisher
-	opts.SetCleanSession(false)
-	opts.SetDefaultPublishHandler(func(client *MQTT.Client, msg MQTT.Message) {
-		messageOutputChannel <- msg
-	})
-
-	client := MQTT.NewClient(opts)
-	if client == nil {
-		return nil, inidef.Error("NewClient failed")
-	}
-	if token := client.Connect(); token.Wait() && token.Error() != nil {
-		return nil, inidef.Error(fmt.Sprintf("NewClient Start failed %q", token.Error()))
-	}
-
-	qos := 0
-	// assume topicPrefix == ""
-	willTopic := fmt.Sprintf("/%s/will", gw.Name)
-	client.Subscribe(willTopic, byte(qos), func(client *MQTT.Client, msg MQTT.Message) {
-		messageOutputChannel <- msg
-	})
-
-	return messageOutputChannel, inidef.Error("")
-}
