### Question:
BaeldungReflectionUtils { static List<String> getNullPropertiesList(Customer customer) throws Exception { PropertyDescriptor[] propDescArr = Introspector.getBeanInfo(Customer.class, Object.class).getPropertyDescriptors(); return Arrays.stream(propDescArr) .filter(nulls(customer)) .map(PropertyDescriptor::getName) .collect(Collectors.toList()); }    }### Answer:
@Test public void givenCustomer_whenAFieldIsNull_thenFieldNameInResult() throws Exception { Customer customer = new Customer(1, "Himanshu", null, null); List<String> result = BaeldungReflectionUtils.getNullPropertiesList(customer); List<String> expectedFieldNames = Arrays.asList("emailId", "phoneNumber"); assertTrue(result.size() == expectedFieldNames.size()); assertTrue(result.containsAll(expectedFieldNames)); }