---
title: "junit 测试期望异常"
author: "hbjava1985"
date: "2014-07-30T11:03:11Z"
tags: []
categories: ["开源软件"]
slug: "junit"
draft: false
lastmod: "2014-07-30T11:03:11Z"
id: 2098170
url: "https://hbjava1985.iteye.com/blog/2098170"
---

```java

 @Test(expected = BuzException.class)
    public void checkDayStrFailedNotDayStr() throws BuzException {
        RefreshService.checkDayStr("aaaaaaaaaaa");
    }

```