package com.dianping.cat.message.spi.core;

import junit.framework.Assert;

import org.junit.Before;
import org.junit.Test;
import org.unidal.lookup.ComponentTestCase;

public class MessagePathBuilderTest extends ComponentTestCase {

	private MessagePathBuilder m_pathBuilder;

	@Before
	public void prepare() throws Exception {
		m_pathBuilder = lookup(MessagePathBuilder.class);
	}

	@Test
	public void test_getHdfsPath() {
		Assert.assertEquals("20121220/17/UNKNOWN/00-c0a82050", m_pathBuilder.getHdfsPath("UNKNOWN-c0a82050-376665-314"));
	}
}

@@ -37,16 +37,44 @@
 .core;%0A%0A
+import java.util.TimeZone;%0A%0A
 import j
@@ -447,16 +447,78 @@
 ath() %7B%0A
+%09%09TimeZone.setDefault(TimeZone.getTimeZone(%22Asia/Shanghai%22));%0A
 %09%09Assert

add timezone into MessagePathBuilderTest