public class DeviceController {
    public void sendShutDown() {
        DeviceHandle handle = getHandle(DEV1);
        if (handle != DeviceHandle.INVALID) {
            retrieveDeviceRecord(handle);
            if (record.getStatus() != DEVICE_SUSPENDED) {
                pauseDevice(handle);
            }
            clearDeviceWorkQueue(handle);
        }
    }
}

@Test(expected = FileNotFoundException.class)
public void testFileNotFound() throws FileNotFoundException {
    new FileInputStream("없는 파일.txt");
}
// 확인된 예외: FileNotFoundException
try {
    FileInputStream stream = new FileInputStream("file.txt");
} catch (FileNotFoundException e) {
    e.printStackTrace();
}

public void retrieveData(String filePath) throws FileNotFoundException {
    try {
        FileInputStream stream = new FileInputStream(filePath);
        // 데이터 처리 로직
    } catch (FileNotFoundException e) {
        throw new StorageException("파일을 찾을 수 없음", e);
    }
}

try {
    FileInputStream stream = new FileInputStream("file.txt");
} catch (FileNotFoundException e) {
    System.out.println("파일을 찾지 못했습니다: " + e.getMessage());
}
public class NullMealExpenses implements MealExpenses {
    @Override
    public int getTotal() {
        return 0; // 기본값 제공
    }
}
public void processTransaction() {
    try {
        executePayment();
    } catch (PaymentException e) {
        handlePaymentError(e);
    }
}

public List<Employee> getEmployees() {
    if (noEmployeesAvailable()) {
        return Collections.emptyList(); // null 대신 빈 리스트 반환
    }
    return employeeList;
}

public double calculateDistance(Point p1, Point p2) {
    if (p1 == null || p2 == null) {
        throw new IllegalArgumentException("Point cannot be null");
    }
    return Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2));
}