@@ -169,6 +169,62 @@ public Integer apply(Integer t1, Integer t2, Integer t3, Integer t4, Integer t5,
169
169
}).apply (new Object [20 ]);
170
170
}
171
171
172
+ @ SuppressWarnings ({"unchecked" , "rawtypes" })
173
+ @ Test (expected = NullPointerException .class )
174
+ public void biFunctionFail () throws Exception {
175
+ BiFunction biFunction = null ;
176
+ Functions .toFunction (biFunction );
177
+ }
178
+
179
+ @ SuppressWarnings ({"unchecked" , "rawtypes" })
180
+ @ Test (expected = NullPointerException .class )
181
+ public void function3Fail () throws Exception {
182
+ Function3 function3 = null ;
183
+ Functions .toFunction (function3 );
184
+ }
185
+
186
+ @ SuppressWarnings ({"unchecked" , "rawtypes" })
187
+ @ Test (expected = NullPointerException .class )
188
+ public void function4Fail () throws Exception {
189
+ Function4 function4 = null ;
190
+ Functions .toFunction (function4 );
191
+ }
192
+
193
+ @ SuppressWarnings ({"unchecked" , "rawtypes" })
194
+ @ Test (expected = NullPointerException .class )
195
+ public void function5Fail () throws Exception {
196
+ Function5 function5 = null ;
197
+ Functions .toFunction (function5 );
198
+ }
199
+
200
+ @ SuppressWarnings ({"unchecked" , "rawtypes" })
201
+ @ Test (expected = NullPointerException .class )
202
+ public void function6Fail () throws Exception {
203
+ Function6 function6 = null ;
204
+ Functions .toFunction (function6 );
205
+ }
206
+
207
+ @ SuppressWarnings ({"unchecked" , "rawtypes" })
208
+ @ Test (expected = NullPointerException .class )
209
+ public void function7Fail () throws Exception {
210
+ Function7 function7 = null ;
211
+ Functions .toFunction (function7 );
212
+ }
213
+
214
+ @ SuppressWarnings ({"unchecked" , "rawtypes" })
215
+ @ Test (expected = NullPointerException .class )
216
+ public void function8Fail () throws Exception {
217
+ Function8 function8 = null ;
218
+ Functions .toFunction (function8 );
219
+ }
220
+
221
+ @ SuppressWarnings ({"unchecked" , "rawtypes" })
222
+ @ Test (expected = NullPointerException .class )
223
+ public void function9Fail () throws Exception {
224
+ Function9 function9 = null ;
225
+ Functions .toFunction (function9 );
226
+ }
227
+
172
228
@ Test
173
229
public void identityFunctionToString () {
174
230
assertEquals ("IdentityFunction" , Functions .identity ().toString ());
0 commit comments