1717
1818package io .openmessaging .internal ;
1919
20- import io .openmessaging .Message ;
2120import io .openmessaging .exception .OMSRuntimeException ;
2221import org .junit .Test ;
2322
@@ -28,11 +27,10 @@ public class AccessPointURITest {
2827 private String fullSchemaURI = "oms:rocketmq://alice@rocketmq.apache.org/us-east" ;
2928
3029 @ Test
31- public void testParse_DriverIsIllegal () throws Exception {
30+ public void testParse_DriverIsIllegal () {
3231 String missDriverType = "oms://alice@rocketmq.apache.org/us-east" ;
33- AccessPointURI accessPointURI = null ;
3432 try {
35- accessPointURI = new AccessPointURI (missDriverType );
33+ new AccessPointURI (missDriverType );
3634 failBecauseExceptionWasNotThrown (OMSRuntimeException .class );
3735 } catch (Exception e ) {
3836 assertThat (e ).hasMessageContaining (String .format ("The OMS driver URL [%s] is illegal." , missDriverType ));
@@ -41,33 +39,33 @@ public void testParse_DriverIsIllegal() throws Exception {
4139
4240 String missRegion = "oms:rocketmq://alice@rocketmq.apache.org/" ;
4341 try {
44- accessPointURI = new AccessPointURI (missRegion );
42+ new AccessPointURI (missRegion );
4543 failBecauseExceptionWasNotThrown (OMSRuntimeException .class );
4644 } catch (Exception e ) {
4745 assertThat (e ).hasMessageContaining (String .format ("The OMS driver URL [%s] is illegal." , missRegion ));
4846 }
4947 }
5048
5149 @ Test
52- public void testGetAccessPointString () throws Exception {
50+ public void testGetAccessPointString () {
5351 AccessPointURI accessPointURI = new AccessPointURI (fullSchemaURI );
5452 assertThat (accessPointURI .getAccessPointString ()).isEqualTo (fullSchemaURI );
5553 }
5654
5755 @ Test
58- public void testGetDriverType () throws Exception {
56+ public void testGetDriverType () {
5957 AccessPointURI accessPointURI = new AccessPointURI (fullSchemaURI );
6058 assertThat (accessPointURI .getDriverType ()).isEqualTo ("rocketmq" );
6159 }
6260
6361 @ Test
64- public void testGetAccountId () throws Exception {
62+ public void testGetAccountId () {
6563 AccessPointURI accessPointURI = new AccessPointURI (fullSchemaURI );
6664 assertThat (accessPointURI .getAccountId ()).isEqualTo ("alice" );
6765 }
6866
6967 @ Test
70- public void testGetHosts () throws Exception {
68+ public void testGetHosts () {
7169 AccessPointURI accessPointURI = new AccessPointURI (fullSchemaURI );
7270 assertThat (accessPointURI .getHosts ()).isEqualTo ("rocketmq.apache.org" );
7371
@@ -77,7 +75,7 @@ public void testGetHosts() throws Exception {
7775 }
7876
7977 @ Test
80- public void testGetRegion () throws Exception {
78+ public void testGetRegion () {
8179 AccessPointURI accessPointURI = new AccessPointURI (fullSchemaURI );
8280
8381 assertThat (accessPointURI .getRegion ()).isEqualTo ("us-east" );
0 commit comments