### Question:
Reflection { public static @Nullable Method getMethod(@Nullable Class<?> clazz, String methodName) { if (clazz == null) { return null; } try { return clazz.getMethod(methodName); } catch (Exception e) { logger.debug(e.getMessage(), e); return null; } } private  Reflection(); static @Nullable Method getMethod(@Nullable Class<?> clazz, String methodName); static @Nullable Field getDeclaredField(@Nullable Class<?> clazz, String fieldName); @SuppressWarnings("unchecked") static T invoke(@Nullable Method method, Object obj); @SuppressWarnings("unchecked") static T invokeWithDefault(@Nullable Method method, Object obj, T defaultValue); static @Nullable Object getFieldValue(@Nullable Field field, Object obj);  }### Answer:
@Test public void shouldReturnNullMethodWhenClassIsNull() { assertThat(Reflection.getMethod(null, null)).isNull(); }
@Test public void shouldReturnNullMethodWhenMethodNotFound() { assertThat(Reflection.getMethod(String.class, "thereWillNeverBeMethodWithThisName")) .isNull(); }