99import java .lang .reflect .Method ;
1010import java .util .ArrayList ;
1111import java .util .List ;
12-
1312import org .junit .Assert ;
1413import org .junit .Before ;
1514import org .junit .Test ;
@@ -68,19 +67,23 @@ public void testEncodeFromLatLong() {
6867 "Latitude %f, longitude %f and length %d were wrongly encoded." ,
6968 testData .latitudeDegrees , testData .longitudeDegrees , testData .length ),
7069 testData .code ,
71- OpenLocationCode .encode (testData .latitudeDegrees , testData .longitudeDegrees , testData .length ));
70+ OpenLocationCode .encode (
71+ testData .latitudeDegrees , testData .longitudeDegrees , testData .length ));
7272 }
7373 }
7474
7575 @ Test
7676 public void testDegreesToIntegers () throws Exception {
7777 // The method to test is private, we use reflection to get it to avoid changing the visibility.
7878 OpenLocationCode olcClass = new OpenLocationCode ("8FWC2345+G6" );
79- Method privateMethod = OpenLocationCode .class .getDeclaredMethod ("degreesToIntegers" , double .class , double .class );
79+ Method privateMethod =
80+ OpenLocationCode .class .getDeclaredMethod ("degreesToIntegers" , double .class , double .class );
8081 privateMethod .setAccessible (true );
8182
8283 for (TestData testData : testDataList ) {
83- long [] got = (long []) privateMethod .invoke (olcClass , testData .latitudeDegrees , testData .longitudeDegrees );
84+ long [] got =
85+ (long [])
86+ privateMethod .invoke (olcClass , testData .latitudeDegrees , testData .longitudeDegrees );
8487 Assert .assertEquals (
8588 String .format ("Latitude %f integer conversion is incorrect" , testData .latitudeDegrees ),
8689 testData .latitudeInteger ,
@@ -96,11 +99,16 @@ public void testDegreesToIntegers() throws Exception {
9699 public void testEncodeIntegers () throws Exception {
97100 // The method to test is private, we use reflection to get it to avoid changing the visibility.
98101 OpenLocationCode olcClass = new OpenLocationCode ("8FWC2345+G6" );
99- Method privateMethod = OpenLocationCode .class .getDeclaredMethod ("encodeIntegers" , long .class , long .class , int .class );
102+ Method privateMethod =
103+ OpenLocationCode .class .getDeclaredMethod (
104+ "encodeIntegers" , long .class , long .class , int .class );
100105 privateMethod .setAccessible (true );
101106
102107 for (TestData testData : testDataList ) {
103- String got = (String ) privateMethod .invoke (olcClass , testData .latitudeInteger , testData .longitudeInteger , testData .length );
108+ String got =
109+ (String )
110+ privateMethod .invoke (
111+ olcClass , testData .latitudeInteger , testData .longitudeInteger , testData .length );
104112 Assert .assertEquals (
105113 String .format (
106114 "Latitude %d, longitude %d and length %d were wrongly encoded." ,
0 commit comments